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.