Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@rspeare
Created October 16, 2017 01:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rspeare/8363c2c055984e155943bc83cb26d890 to your computer and use it in GitHub Desktop.
Save rspeare/8363c2c055984e155943bc83cb26d890 to your computer and use it in GitHub Desktop.
P values for sklearn logistic regression
@Akanksha594
Copy link

i am working on lending club loan data set where i have to work on credit risk analysis for that i am applying logistic regression and also have to use p value code. i have applied same code as you have mentioned on git hub but i am getting error that is linalgerror: singular matrix. So can you provide me solution for this. I will be thankful to you.

@Akanksha594
Copy link

please give me response as soon as possible.

@rspeare
Copy link
Author

rspeare commented Apr 26, 2020

Hey @Akanksha594 , sorry for the delay. A singular matrix normally means that you are regressing on features that are correlated or perhaps have more features than training points. (Both of which can be solved with regularization) Are you using a regularization with the logistic regression? Maybe some insight into the data you're using, or a reproducible example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment