-
Notifications
You must be signed in to change notification settings - Fork 2
Approximator: CUR #158
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
Open
nathanielpritchard
wants to merge
26
commits into
main
Choose a base branch
from
v0.2-cur
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Approximator: CUR #158
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
dmaldona
requested changes
Feb 6, 2026
Contributor
dmaldona
left a comment
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.
couple of comments
src/Approximators/GeneralObliqueApproximators/CURCore/cross_approximation.jl
Show resolved
Hide resolved
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request creates the CUR approximator feature requrested in https://github.com/numlinalg/RLinearAlgebra.jl/issues/147. It contains implementation for the CUR
approximator and the CURCore structures. The CUR approximator is a global structure which is implemented to allow matrix multiplications and eventually back solve operations, the CURCore is how the CUR is fine tuned.
As an example of how this differentiation is necessary, for a selection of rows and columns the core matrix can be formed in at least two different ways. One is the optimal way where if$C$ is the select columns and $R$ is the selected rows from $A$ the core matrix $U = $C^\dagger A R^\dagger$ . As this core requires additional accesses to the matrix, that are suboptimal we can also define $U = A[I, J]$ where $I$ are the row indices that make up $R$ and $J$ are the row indices that make up $C$ .
This PR features three new files
cur.jlwhich includes the structures for the cur decomposition and the functionscomplete_approximatorandmul!.CURCore.jldefines abstract types corresponding to the CUR core matrix, as well as aCURCoreAdjointstructure. The functions include basicmul!functionality similar toCompressors.jl, the size function, as well as the revenant completion and update functions (although for compilation reasons these functions are actually placed incur.jl.cross_approximation.jl, features the implementation of the cross approximation CUR core, as well as the complete function and therapproximate!function.rapproximateis implemented to correspond to theCURCoreand not theCURbecause the ordering of selection varies based on theCURCorethat is used. So it makes sense that the implementation would align with that and not theCURdata structure.How has this been tested
Types of changes
Checklists:
Code and Comments
If this PR includes modification to the code base, please select all that apply.
API Documentation
Manual Documentation
Testing
@code_lowered and
@code_typed)