[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## [Octave-bug-tracker] [bug #60348] [octave forge] (statistics) logistic_r

**From**: |
Nicholas Jankowski |

**Subject**: |
[Octave-bug-tracker] [bug #60348] [octave forge] (statistics) logistic_regression |

**Date**: |
Mon, 8 Aug 2022 16:18:53 -0400 (EDT) |

Follow-up Comment #1, bug #60348 (project octave):
ok, rechecking this against what is thought to be the corrected definition in
bug #56118 bug #58318, where it is suggested the formula should have been
written:
logit(gamma_i(x)) = theta_i + x * beta
noting from bug #58651, you thought it must work out to be -THETA + X * BETA.
checking both below from the same database gives:
[THETA, BETA, DEV, DL, D2L, P] = logistic_regression (Y, X) ;
P2 = 1 ./ (1 + exp(-(THETA + X * BETA)));
corr(P2, Y)
ans = 0.7252
P2 = 1 ./ (1 + exp(-(-THETA + X * BETA)));
corr(P2, Y)
ans = 0.8790
(and the old definition)
P2 = 1 ./ (1 + exp(-(THETA - X * BETA)));
corr(P2, Y)
ans = -0.8790
(matlab 2022a still gives [-0.8770; 0.8770])
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60348>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/

**[Octave-bug-tracker] [bug #60348] [octave forge] (statistics) logistic_regression**,
*Nicholas Jankowski* **<=**