Linear regression is used to predict a numerical value. But what if we want to use regression to predict categorical values. In that case we use logistic regression which returns us an logit value on which we determine the cut off value for yes or no.
Logistic regression works best with numerical independent variables although it can accommodate categorical variables.
I am running Logistic Regression on a categorical data set , hence the accuracy is a mere 16% but its worth checking out.
In the case of UCI adult data set we want to predict if the individual has an income above or below 50K. Which is nothing but a factor variable.
To run the model i made use of the function glm in R .
For the code and method please visit my GitHub link below