Andrew Ng机器学习笔记#3

                                     Logistic regression

 

  1. Hypothesis function and definition:

 

Andrew Ng机器学习笔记#3

Andrew Ng机器学习笔记#3

 

Therefore, the final form of the hypothesis function shall look like this:

Andrew Ng机器学习笔记#3

   

   2. Decision boundary:

 

Andrew Ng机器学习笔记#3

Andrew Ng机器学习笔记#3

 

     3.Cost function:

 

Andrew Ng机器学习笔记#3

 

 

     4.Gradient descent:

 

Andrew Ng机器学习笔记#3

 

 

Notice that this is exactly the same as that of the linear regression.

 

Andrew Ng机器学习笔记#3

 

This vectorized implementation is very useful and convenient to express in Matlab & octave.

 

   5.Multiclass classification:

 

Andrew Ng机器学习笔记#3

Andrew Ng机器学习笔记#3