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
Low-rank updated operators and Sherman-Morrison-Woodbury formula #743
Conversation
I think I would go for adding rules to In the long run, this might be an argument for adding an Is there a better name than |
Just to add some additional complication: As an alternative to the SMW for the low-rank updated operator, there is also the augmented matrix approach (reformulation, such that the lr-updated operator is the schur complement). I recently learnt that at Virginia Tech they have successfully used that to avoid the numerical stability issues of SMW in some cases. Also, the In principle I am in support of splitting the operators and algorithm driven inverses, in case we can not map the later to actual operators in the discretization backend. |
Is the input to
Not sure. In HOSVD, there is a "core" tensor. There is also CUR decomposition, but I don't know what "U" stands for. I'm open to other suggestions. |
Not ATM, and I am not completely convinced how useful it is in general. It would be quite easy to add this as the first rule to
The inverse at the |
This would avoid checking in individual rules for zero coefficients, e.g., if
It appears in some variants of balanced truncation and the inverse does not have to be computed in the SWM formula. Also, there is no pyMOR interface for
The implementation of |
Ok, feel free to add a rule if you feel the need.
Oh, sorry, I wasn't aware this is a NumPy array (which of course makes sense). Maybe it would be an option to have the inverse as an option. I assume there might be other applications for a |
I was thinking about this. In that case, a linear combination of |
Codecov Report
|
I removed the option for @sdrave Do you have an idea how to better test |
op = assemble_lincomb([LR1, LR2], [1, 1]) | ||
assert isinstance(op, LowRankOperator) | ||
assert len(op.left) == r1 + r2 | ||
assert op.inverted |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should also apply some random vectors and see if op
does the right thing.
@sdrave Thanks, I made the changes. |
The changes look good. However, I still think there should be better tests for |
Aha, ok, I thought you meant only the operators themselves. |
So far, this adds
LowRankOperator
andLowRankUpdatedOperator
tooperators.constructions
. TheLowRankUpdatedOperator
uses Sherman-Morrison-Woodbury formula inapply_inverse
andapply_inverse_adjoint
.The motivation for L M-1 RH form of the low-rank operator is from Riccati equations appearing in variants of balanced truncation (LQG balanced truncation with nonzero D, balanced stochastic truncation, bounded real balanced truncation with nonzero D, ...). In particular, I'm considering removing the
S
part inriccati.solve_ricc_lrcf
and instead expect it to be given as a low-rank update inA
.What remains is making
LincombOperator
and/oralgorithms.lincomb
aware of these operators, which I'm not sure how to do. One approach might be adding at least three rules tolincomb
:LowRankOperators
, return a singleLowRankOperator
LowRankOperator
, return aLowRankUpdatedOperator
LowRankUpdatedOperator
and another operator, return a newLowRankUpdatedOperator
Another approach might be removing
LowRankUpdatedOperator
and makingLincombOperator
detectLowRankOperators
and use SMW formula.@sdrave Thoughts?
Closes #502.