Classification using logistic regression
The most common method for classification is using logistic regression. Logistic regression is a probabilistic and linear classifier. The probability that vector of input features is a member of a specific class can be written formally as the following equation:
In the above equation:
- Y represents the output,
- i represents one of the classes
- x represents the inputs
- w represents the weights
- b represents the biases
- z represents the regression equation
- ϕ represents the smoothing function or model in our case
The preceding equation represents that probability that x belongs to class i when w and b are given, is represented by function ϕ(z). Thus the model has to be trained to maximize the value of probability.
Logistic regression for binary classification
For binary classification, we define the model function ϕ(z) to be the sigmoid function, written as follows:
The sigmoid function produces the value of y to lie between the range [0,1]. Thus we can use the value...