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.


Andrew Ng

and we should notice that 

Andrew Ng


Decision Boundary

Decision boundary is a function of theta. It seperates the area of y=1 and y=0. 


Andrew Ng

theta'*X can be a non-linear .

Cost Function

We have the cost function in the form that : 


Andrew Ng

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. 


Andrew Ng

Library Function

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


Andrew Ng

Andrew Ng

Pay attention

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

  (2)