An intuitive visual guide to a powerful ML algorithm applied to predict voting patterns among the US States.
Have you ever wondered why certain states tend to vote Republican while others vote Democrat? Is there a way to predict which way a state will vote in any given year? Letâs say we want to predict whether a state is
âredâ or
âblueâ based on a few variables that we observe about it. To do this, weâll use Decision Trees.
Red and Blue Map, 2016; Image from Wikipedia
Decision trees are both a classification and regression supervised learning model used to predict the value of a target variable (Y) using information from several input variables (Xs).