Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Add inf/nan protection to regression models #4969

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bashtage
Copy link
Member

Add an inf/nan check for regression models

closes #3468
closes #1642

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 83.843% when pulling 3637217 on bashtage:protect-regressions-inf-nan into 66fc298 on statsmodels:master.

@coveralls
Copy link

coveralls commented Aug 23, 2018

Coverage Status

Coverage increased (+0.001%) to 84.505% when pulling d789883 on bashtage:protect-regressions-inf-nan into 28609c0 on statsmodels:master.

@codecov-io
Copy link

codecov-io commented Aug 23, 2018

Codecov Report

Merging #4969 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4969      +/-   ##
==========================================
+ Coverage      82%   82.01%   +0.01%     
==========================================
  Files         588      588              
  Lines       93061    93114      +53     
  Branches    10313    10321       +8     
==========================================
+ Hits        76311    76364      +53     
  Misses      14378    14378              
  Partials     2372     2372
Impacted Files Coverage Δ
statsmodels/regression/linear_model.py 87.35% <100%> (+0.18%) ⬆️
statsmodels/regression/tests/test_regression.py 96.76% <100%> (+0.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28609c0...d789883. Read the comment docs.

@jbrockmendel
Copy link
Contributor

LGTM. @josef-pkt Travis error is unrelated http error.

@jbrockmendel
Copy link
Contributor

@josef-pkt this bashtage PR is green and doesn’t need rebase

@josef-pkt
Copy link
Member

needs decision

I'm not sure, about whether we want to do this.
most likely we need an option to turn this off, add it to all models
linear regression models already have an isfinite check if has_const is None, AFAIR

Add an inf/nan check for regression models

closes statsmodels#3468
closes statsmodels#1642
@bashtage bashtage force-pushed the protect-regressions-inf-nan branch from 895503c to d789883 Compare May 2, 2019 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

statsmodel wls gets stuck during the .fit() process linalg check_finite hang with inf
5 participants