1

I am new to ML world. Trying to do Logistic regression from Stats model. However, when I execute I get current Function Value as nan I tried checking if dataframe is finite as I saw it might be cause. But that turns out to be ok. Referred the below link, but did not work in my case.

update : Still did not figure it out

Referred Links :

  1. MNLogit in statsmodel returning nan

  2. numpy: Invalid value encountered in true_divide

Please can someone help me on this ?

[![Finite Values result][1]][1]

[![Error with current function value as nan][2]][2] [![All Nans in summary][3]][3]

vijaya lakshmi
  • 415
  • 1
  • 5
  • 24

1 Answers1

0

After reviewing your problem and the solution identified in referred link#1. {FYI it gives the same error as shown in your screen capture.} It seems like you need to identify a different solving method. In your code you can try to do the following to have the same solution as link#1.

result=logit_model.fit(method='bfgs')

I'm sorry if you already tried this. Unfortunately, I cannot test it without the dataset, let me know if that works.

Sami Safarini
  • 96
  • 1
  • 4