Connect your moderator Slack workspace to receive post notifications:
Sign in with Slack

RuntimeWarning using Logistic Regression

Hello,

I tried implementing logistic regression in the project and obtained this:

RuntimeWarning: invalid value encountered in double_scalars
  if len(losses) > 1 and np.abs(losses[-1] - losses[-2]) < threshold:

I didn't get such an error in the lab and am not sure how to resolve it.

Thank you for your help

Probably means that you have NaN or Inf values.

This might help: https://stackoverflow.com/questions/37651803/runtimewarning-invalid-value-encountered-in-greater

Thank you for your reply,
But what would cause a NaN or Inf value returned as a loss? How should it be interpreted for stopping criterion?

Page 1 of 1

Add comment

Post as Anonymous Dont send out notification