Skip to content

BUG/ENH: Improve RLM in the case of perfect fit - #5967

Merged
bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:fix-rlm
Jul 17, 2019
Merged

bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:fix-rlm

Conversation

@bashtage

@bashtage bashtage commented Jul 17, 2019 •

Copy link
Copy Markdown
Member

Ensure RLM doesn't crash if perfect fit
Clean norms so that they don't crash either
Avoid calculations the load to nan
Improve testing of RLM
Replace fabs with abs

xref #55

Details

Notes:

  • It is essential that you add a test when making code changes. Tests are not
    needed for doc changes.
  • When adding a new function, test values should usually be verified in another package (e.g., R/SAS/Stata).
  • When fixing a bug, you must add a test that would produce the bug in master and
    then show that it is fixed with the new code.
  • New code additions must be well formatted. Changes should pass flake8. If on Linux or OSX, you can
    verify you changes are well formatted by running
    git diff upstream/master -u -- "*.py" | flake8 --diff --isolated
    
    assuming flake8 is installed. This command is also available on Windows
    using the Windows System for Linux once flake8 is installed in the
    local Linux environment. While passing this test is not required, it is good practice and it help
    improve code quality in statsmodels.
  • Docstring additions must render correctly, including escapes and LaTeX.

Ensure RLM doesn't crash if perfect fit
Clean norms so that they don't crash either
Avoid calculations the load to nan
Improve testing of RLM
Replace fabs with abs

closes statsmodels#5585
closes statsmodels#1341
closes statsmodels#5878
closes statsmodels#5356
closes statsmodels#3319
xref statsmodels#55
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.03%) to 85.604% when pulling 2a56dbb on bashtage:fix-rlm into 4acd7a0 on statsmodels:master.

@bashtage
bashtage merged commit 2b79954 into statsmodels:master Jul 17, 2019
@bashtage
bashtage deleted the fix-rlm branch July 17, 2019 18:46
@codecov

codecov Bot commented Jul 17, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #5967 into master will increase coverage by 0.05%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5967      +/-   ##
=========================================
+ Coverage   83.05%   83.1%   +0.05%     
=========================================
  Files         604     604              
  Lines       95259   95327      +68     
  Branches    10430   10431       +1     
=========================================
+ Hits        79117   79224     +107     
+ Misses      13739   13697      -42     
- Partials     2403    2406       +3
Impacted Files Coverage Δ
statsmodels/robust/robust_linear_model.py 92.94% <100%> (+7.22%) ⬆️
statsmodels/robust/norms.py 96.93% <100%> (+16.01%) ⬆️
statsmodels/robust/tests/test_rlm.py 100% <100%> (ø) ⬆️
statsmodels/robust/scale.py 86.3% <100%> (+0.38%) ⬆️
statsmodels/sandbox/distributions/mv_normal.py 39.06% <0%> (ø) ⬆️
statsmodels/sandbox/regression/treewalkerclass.py 0% <0%> (ø) ⬆️
statsmodels/sandbox/stats/multicomp.py 47.02% <0%> (ø) ⬆️
statsmodels/stats/libqsturng/make_tbls.py 0% <0%> (ø) ⬆️
statsmodels/tsa/statespace/mlemodel.py 85.14% <0%> (ø) ⬆️
statsmodels/iolib/summary.py 58% <0%> (ø) ⬆️
... and 3 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 4acd7a0...2a56dbb. Read the comment docs.

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

Projects

None yet

2 participants