Supervised learning classification model logistic regression

Logistic regression

- Linear regression problems one how to determine whether the tumor is malignant?

 

 

- linear regression robust enough, if there is noise, immediately, "surrender"

 

 

Logistic regression - Classification

 

 

 

Sigmoid function (compression function)

 

We will fit out the value of the linear regression compressed with a compression function, the compression is completed -

  0.5 with a probability to make the decision boundary, the sample can be divided into two categories, i.e. positive samples

 

 

 

 

 

• sigmoid function, the determined value of the positive and negative z g (z) is greater than the last 0.5 or less than 0.5;

  I.e. z is greater than 0, g (z) is greater than 0.5, when z is less than 0, g (z) is less than 0.5

• When the z expression is classified corresponding to a boundary, exactly corresponding to different sides of the boundary z negative classification,

  It makes the classification boundary sides respectively g (z)> 0.5, and g (z) <0.5, so depending on the magnitude relation g (z) and 0.5,

  Classification can be achieved

 

 

 

Logistic regression loss function

- the problem of quadratic loss function

 

 
 
Loss function

 

 

 

 

In this way, we obtain a convex function.

 

 

Gradient descent method to solve

 

Guess you like

Origin www.cnblogs.com/LXL616/p/11235498.html