New to statistical and machine learning and taking some online courses.

I am trying to understand logistic regression in more details, and noticed a difference in the formula between the Andrew Ng course and the Stanford statistical learning course. Below I post a link image to both formulas. So the numerator is different. I must be missing smthg as I am a noob in this:

$$p(X)=\frac{e^{\beta_0+\beta_1X}}{1+e^{\beta_0+\beta_1X}}$$ and $$h_\theta(x)=\frac{1}{1+e^{-\theta^\top x}}.$$ http://prntscr.com/dmyvx7

http://prntscr.com/dmywgy

share|improve this question
up vote 15 down vote accepted

$h_{\theta}(x)=\dfrac{1}{1+e^{-X\beta}}=\dfrac{1}{1+\frac{1}{e^{X\beta}}}=\dfrac{1}{\dfrac{e^{X\beta}}{e^{X\beta}}+\dfrac{1}{e^{X\beta}}}=\dfrac{1}{\dfrac{e^{X\beta}+1}{e^{X\beta}}}=\dfrac{e^{X\beta}}{1+e^{X\beta}}=p(X)$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.