Andrew Ng 's machine learning lecture note (6)

Logistic function

When we are solving classifcation problem,we seldom use linear regression method.We should define a new function called logistic function to be our  hypothesis.
and we should notice that 

Decision Boundary

Decision boundary is a function of theta. It seperates the area of y=1 and y=0. 
theta'*X can be a non-linear .

Cost Function

We have the cost function in the form that : 

Gradient Decent

In order to minimize the cost function , we can use gradient decent ,and the same as linear regression problem , we should update theta simultaneously. 

Library Function

We can use OCTAVE's library function to calculate the gradient decent like library function 'fminunc'.

Pay attention

  (1) The hypothesis is not equal to theta*X' like linear regression
  (2)


猜你喜欢

转载自blog.csdn.net/frostmonarch/article/details/79815092