I'm trying out logistic regression. While running the code, i get math domain error in python. Found out that i'm inputting (mx+b > 38) values large than 38 into the sigmoid function and it outputs 1, and the log function (-log(1-1)) spits out "math domain error".
Here are my steps:
Please help.
You should normalize your data before putting it into logistic function. Normalization means putting values in [0, 1] range, therefore you should not be getting 1's as outputs from sigmoid anymore. You can use this function for normalization: sklearn.preprocessing.normalize