[Sklearn] Data classification prediction based on logistic regression algorithm (Excel can directly replace data)
1. Model Principle
Logistic regression is a statistical learning method for binary classification problems, and despite the word "regression" in its name, it is actually a classification algorithm. Its basic principle is to build a linear model, then map the linear output to a probability value, and finally convert this probability value into a prediction result of the two classifications.
The following is the basic principle of logistic regression:
-
Linear Model: First, logistic regression builds a linear model that maps linear combinations of features to a continuous range of real numbers. For a sample with n features, the linear model can be expressed as:
z = b +