Skip to content

MAINT: numpy compat, keep old rcond in lstsq - #4384

Merged
josef-pkt merged 1 commit into
statsmodels:masterfrom
josef-pkt:maint_numpy_lstsq_rcond
Mar 22, 2018
Merged

josef-pkt merged 1 commit into
statsmodels:masterfrom
josef-pkt:maint_numpy_lstsq_rcond

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

see #3994 numpy changes default rcond in lstsq

we get many warnings in the unit tests with recent numpy
"To use the future default and silence this warning we advise to pass rcond=None, to keep using the old, explicitly pass rcond=-1."

This PR adds rcond=-1 to maintain the old behavior.

More generally, we might want to switch to a different behavior with rcond proportional to sqrt(nobs)
but this PR is just maintenance.

aside: There is a copy of a lstsq function in statsmodels.tools.linalg based on scipy linalg, which I guess is currently not in use. uses cond instead of rcond. I didn't make any changes there.

@coveralls

coveralls commented Mar 22, 2018 •

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 82.601% when pulling e07539c on josef-pkt:maint_numpy_lstsq_rcond into ac87dec on statsmodels:master.

@josef-pkt

Copy link
Copy Markdown
Member Author

all rcond are gone from the test logs

merge when appveyor is finished

@codecov-io

Copy link
Copy Markdown

Codecov Report

Merging #4384 into master will not change coverage.
The diff coverage is 28.57%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4384   +/-   ##
=======================================
  Coverage   79.96%   79.96%           
=======================================
  Files         560      560           
  Lines       84154    84154           
  Branches     9534     9534           
=======================================
  Hits        67295    67295           
+ Misses      14641    14640    -1     
- Partials     2218     2219    +1
Impacted Files Coverage Δ
statsmodels/tsa/seasonal.py 69.14% <ø> (ø) ⬆️
statsmodels/sandbox/panel/mixed.py 0% <0%> (ø) ⬆️
statsmodels/nonparametric/smoothers_lowess_old.py 0% <0%> (ø) ⬆️
statsmodels/tsa/varma_process.py 0% <0%> (ø) ⬆️
statsmodels/sandbox/stats/contrast_tools.py 0% <0%> (ø) ⬆️
statsmodels/sandbox/tsa/diffusion.py 0% <0%> (ø) ⬆️
statsmodels/tsa/vector_ar/var_model.py 83.53% <100%> (ø) ⬆️
statsmodels/sandbox/nonparametric/smoothers.py 56.25% <100%> (ø) ⬆️
statsmodels/tsa/vector_ar/svar_model.py 61.9% <100%> (ø) ⬆️
statsmodels/regression/_tools.py 89.28% <100%> (ø) ⬆️
... and 1 more

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 ac87dec...e07539c. Read the comment docs.

@josef-pkt
josef-pkt merged commit 23c22d6 into statsmodels:master Mar 22, 2018
@josef-pkt josef-pkt added this to the 0.9 milestone Apr 5, 2018
@josef-pkt
josef-pkt deleted the maint_numpy_lstsq_rcond branch April 18, 2018 14:23
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.

3 participants