November 11th, 2013, 03:23 PM
Logistic regression Calc
Can someone educate me on how to code this calculation in Python?
November 11th, 2013, 03:37 PM
Python is case sensitive. First convert the expression to lower case. With emacs I used C-u C-u C-u M-l . round is builtin. The 4 as its second argument tells round to use 4 decimal places. Function exp is available, but you need to load it from the math library. Finally, xbeta needs a value.
from math import exp
xbeta = 0.2
[/code] are essential for python code and Makefiles!
November 11th, 2013, 04:00 PM
Works like a charm thanks, it's easier when you import the math function.