Skip to content

ENH: Allow const idx to be found - #5680

Merged
bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:check-const-idx-have-const
May 10, 2019
Merged

bashtage merged 1 commit into
statsmodels:masterfrom
bashtage:check-const-idx-have-const

Conversation

@bashtage

@bashtage bashtage commented May 10, 2019 •

Copy link
Copy Markdown
Member

Check const_idx when has_const is set to True

  • tests added / passed.
  • code/documentation is well formatted.
  • properly formatted commit message. See
    NumPy's guide.

@bashtage
bashtage force-pushed the check-const-idx-have-const branch from 8547bbf to baf7862 Compare May 10, 2019 11:04
@coveralls

coveralls commented May 10, 2019 •

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.04%) to 84.707% when pulling 957cea9 on bashtage:check-const-idx-have-const into 3a5b88a on statsmodels:master.

@codecov

codecov Bot commented May 10, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #5680 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5680      +/-   ##
==========================================
+ Coverage   82.17%   82.18%   +<.01%     
==========================================
  Files         593      593              
  Lines       93671    93678       +7     
  Branches    10354    10352       -2     
==========================================
+ Hits        76978    76985       +7     
- Misses      14295    14296       +1     
+ Partials     2398     2397       -1
Impacted Files Coverage Δ
statsmodels/base/tests/test_data.py 100% <100%> (ø) ⬆️
statsmodels/iolib/tests/test_summary2.py 100% <100%> (ø) ⬆️
statsmodels/regression/tests/test_regression.py 96.64% <100%> (+0.04%) ⬆️
statsmodels/base/data.py 90.34% <100%> (-0.15%) ⬇️
statsmodels/stats/descriptivestats.py 24.34% <0%> (ø) ⬆️

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 3a5b88a...957cea9. Read the comment docs.

Check const_idx when when has_const is set to True
Add test to ensure that f is computed when hasconst
@bashtage
bashtage force-pushed the check-const-idx-have-const branch from baf7862 to 957cea9 Compare May 10, 2019 17:29
@bashtage
bashtage merged commit e104681 into statsmodels:master May 10, 2019
@bashtage
bashtage deleted the check-const-idx-have-const branch May 10, 2019 21:18
@josef-pkt

Copy link
Copy Markdown
Member

This removes the short-circuiting to avoid checking for where the constant is.
It's a performance regression when the user knows that there is an implicit constant, i.e. if has_const=True

@josef-pkt

Copy link
Copy Markdown
Member

A file search does not find any usage of hasconst outside of the related unit tests.
I'm pretty sure I used it somewhere, maybe a notebook or PR, as computational shortcut. (saves two matrix_rank computation in implicit constant case, but only one ptp in the explicit constant case.)

@bashtage

bashtage commented May 11, 2019 via email

Copy link
Copy Markdown
Member Author

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants