8
$\begingroup$

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

$\endgroup$
18
$\begingroup$

$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)$

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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