Introduction to Machine Learning (10): Regression and Clustering Algorithms-Logistic Regression and Binary Classification

Learning Directory:
Insert picture description here

Logistic regression content directory:

Insert picture description here
Logistic regression application scenario : applied to the binary classification problem.
Logistic regression principle : map the output of linear regression to the activation function sigmiod, and output a number in the 0-1 interval as a probability value. If it is greater than the threshold we set, it is considered to belong to This category.
Insert picture description here

Loss function: log likelihood function

Insert picture description here
Insert picture description here
Insert picture description here

The overall logistic regression process:

Insert picture description here

API:

Insert picture description here

Classification evaluation index

Calculation of precision rate and recall rate:

Insert picture description here
When the sample classification is not balanced, 99 no, 1 yes, it is not easy to use the precision rate and the recall rate : it is necessary to introduce the ROC curve and the AUC indicator
Insert picture description here
Insert picture description here
Insert picture description here
API
Insert picture description here

Model saving and loading

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_45234219/article/details/115050054