Binary Classification
As mentioned previously, binary classification refers to a type of supervised learning where the target variable can only take two possible values (or classes) such as true/false or yes/no. For instance, in the medical industry, you may want to predict whether a patient is more likely to have a disease based on their personal information such as age, height, weight, and/or medical measurements. Similarly, in marketing, advertisers might utilize similar information to optimize email campaigns.
Machine learning algorithms such as the random forest classifier, support vector classifier, or logistic regression work well for classification. Neural networks can also achieve good results for binary classification. It is extremely easy to turn a regression model such as those in the previous chapter into a binary classifier. There are only two key changes required: the activation function for the last layer and the loss function.
Logistic Regression
Logistic...