Classification
Similar to the regression algorithm, classification also learns from the dependent or target variables and uses all the predictor or independent variables to find the right pattern. The major difference comes from the idea that in classification, the target variable is categorical, whereas in regression, it is numeric. In this section, we will introduce logistic regression to demonstrate the concept using the Beijing PM2.5 dataset.
Logistic Regression
Logistic regression is the most favorable white-box model used for binary classification. White-box models are defined as models providing visibility into the entire reasoning done for the prediction. For each prediction made, we can leverage the model's mathematical equation and decode the reasons for the prediction made. There are also a set of classification models that are entirely black-box, that is, by no means can we understand the reasoning for the prediction leveraged by the model. In situations where we want to focus...