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

PERF: GLM - don't use pinv in initialize #4624

Merged
merged 1 commit into from May 13, 2018

Conversation

thequackdaddy
Copy link
Member

See #4622 and #1720 (comment)

This removes pinv from the initialize step, which saves time on large(ish) exogs.

@thequackdaddy thequackdaddy changed the title PERF: GLM - use regular inverse, not pinv for PERF: GLM - use regular inverse, not pinv May 13, 2018
@thequackdaddy thequackdaddy changed the title PERF: GLM - use regular inverse, not pinv PERF: GLM - don't use pinv in initialize May 13, 2018
@coveralls
Copy link

coveralls commented May 13, 2018

Coverage Status

Coverage decreased (-0.0006%) to 82.88% when pulling 5afdb82 on thequackdaddy:ignore_pinv into f790b88 on statsmodels:master.

@codecov-io
Copy link

Codecov Report

Merging #4624 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4624      +/-   ##
==========================================
- Coverage   80.28%   80.28%   -0.01%     
==========================================
  Files         564      564              
  Lines       85664    85661       -3     
  Branches     9681     9681              
==========================================
- Hits        68772    68769       -3     
+ Misses      14664    14663       -1     
- Partials     2228     2229       +1
Impacted Files Coverage Δ
statsmodels/genmod/generalized_linear_model.py 89.48% <100%> (-0.07%) ⬇️
statsmodels/stats/descriptivestats.py 24.13% <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 f790b88...5afdb82. Read the comment docs.

@josef-pkt
Copy link
Member

I'm pretty sure this is correct (there is no use for pinv_wexog that is based on exog), and no test failures

merging
@thequackdaddy Thank you

@josef-pkt josef-pkt merged commit 3f44cbe into statsmodels:master May 13, 2018
@josef-pkt josef-pkt added this to the 0.9 milestone May 13, 2018
@josef-pkt josef-pkt mentioned this pull request May 13, 2018
@thequackdaddy thequackdaddy deleted the ignore_pinv branch May 13, 2018 22:26
josef-pkt added a commit to josef-pkt/statsmodels that referenced this pull request May 14, 2018
REF/PERF: GLM - remove unused pinv in initialize closes statsmodels#4622
@@ -114,8 +114,6 @@ class GLM(base.LikelihoodModel):
See Parameters.
normalized_cov_params : array
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this also be removed from the docstring? the attribute is removed below

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If so, the docstring entry in GLMResults needs to be updated too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that attribute is gone and should also be removed from the docstring.

normalized_cov_params in GLMResults, is the real one evalutated at the final estimate.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. This is the kind of thing that I'd be happy to address in a quick-turnaround PR if e.g. @bashtage were anointed to review+merge.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A clear docstring fix is usually a fast merge,
(as long as you don't try to sneak in any other refactoring that might be controversial or need more careful review)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A clear docstring fix is usually a fast merge,

Experience suggests otherwise. I'll fix this downstream and leave this for the next sucker.

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.

None yet

5 participants