0

I tried to create a logistic regression model and then plot it, the first try didn't really work out and I got something like this:

enter image description here

However then I realized that my data is imbalanced (around 85% are 1s a the rest are 0s), so I changed my model to have a weighted logistic regression:

clf = LogisticRegression(class_weight='balanced')

for some of the data this worked perfectly, as seen in the Average age chart, however, some are still not 'curvy' and are missing the sigmoid look (in terms of Work from home, negative sigmoid look).

enter image description here

Any idea why this can be?

Sam333
  • 199
  • 14

0 Answers0