Skip to content

ENH: add functions for up and down-dating inverse matrices - #6265

Open
josef-pkt wants to merge 1 commit into
statsmodels:mainfrom
josef-pkt:linalg_updating
Open

josef-pkt wants to merge 1 commit into
statsmodels:mainfrom
josef-pkt:linalg_updating

Conversation

@josef-pkt

Copy link
Copy Markdown
Member

see #6253

some tools for working with inverse covariance, precision matrices

@josef-pkt

Copy link
Copy Markdown
Member Author

azur is all green, linting check in travis is also green
linting does not complain about whitespace in formatting of matrices
I use # flake8: noqa: E201 in test file

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.0009%) to 86.987% when pulling 4b7ef7c on josef-pkt:linalg_updating into 79c61b3 on statsmodels:master.

@josef-pkt

josef-pkt commented Nov 22, 2019 •

Copy link
Copy Markdown
Member Author

This is experimental, I'm not sure what we need yet.
e.g. adding or dropping variables is in two functions, one that adjusts shape of inverse matrix and one that does not.

The module is private, and main functionality is unit tested.
We might want to delete one function that does not produce the correct diagonal element when updating the inverse matrix
Another function is a simplified case for adding variables at end and is redundant with more general functions.
These two don't have unit test coverage.

merge soon and focus on usages of this, e.g. in variable selection, all subset regression or similar

@codecov

codecov Bot commented Nov 22, 2019 •

Copy link
Copy Markdown

Codecov Report

Merging #6265 into master will increase coverage by <.01%.
The diff coverage is 83.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6265      +/-   ##
==========================================
+ Coverage   84.56%   84.56%   +<.01%     
==========================================
  Files         643      645       +2     
  Lines      101188   101419     +231     
  Branches    11104    11124      +20     
==========================================
+ Hits        85568    85770     +202     
- Misses      13173    13192      +19     
- Partials     2447     2457      +10
Impacted Files Coverage Δ
statsmodels/tools/_linalg_updating.py 78.46% <78.46%> (ø)
statsmodels/tools/tests/test_linalg_update.py 91.08% <91.08%> (ø)
statsmodels/sandbox/distributions/mv_normal.py 38.82% <0%> (ø) ⬆️
statsmodels/sandbox/regression/treewalkerclass.py 0% <0%> (ø) ⬆️
statsmodels/sandbox/stats/multicomp.py 46.93% <0%> (ø) ⬆️
statsmodels/stats/libqsturng/make_tbls.py 0% <0%> (ø) ⬆️
statsmodels/iolib/summary.py 57.74% <0%> (ø) ⬆️
statsmodels/tools/grouputils.py 69.91% <0%> (+0.44%) ⬆️
... and 2 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 79c61b3...4b7ef7c. Read the comment docs.

@lgtm-com

lgtm-com Bot commented Nov 22, 2019

Copy link
Copy Markdown

This pull request introduces 24 alerts and fixes 1 when merging 4b7ef7c into 79c61b3 - view on LGTM.com

new alerts:

  • 20 for Module is imported with 'import' and 'import from'
  • 4 for Module is imported more than once

fixed alerts:

  • 1 for Unused import

@josef-pkt

Copy link
Copy Markdown
Member Author

lgtm analyzed many files, most alerts are not new.

@josef-pkt

Copy link
Copy Markdown
Member Author

Does this have overlap with sweep? #6268

This has only linalg tools, no internal application.
Merge can be postponed until we have an internal use for it.

preliminary milestone 0.14

@josef-pkt josef-pkt modified the milestones: 0.14, 0.15 Dec 1, 2022
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.

2 participants