This repository was archived by the owner on Jan 15, 2026. It is now read-only.
Conversation
Contributor
|
This is good; how about moving the solvers into their own function (taking just the matrices K_NM, K_MM, and Y), separate from the setup/manager/saving logic implemented in |
max-veit
reviewed
May 27, 2021
| and computing P_NM = K_NM @ U_MM @ Lam_MM^(-1.2) and then solves the linear | ||
| problem for those (which is usually better conditioned) | ||
| (P_NM.T@P_NM + 1)^(-1) P_NM.T@Y | ||
| by default, "Normal" |
Contributor
There was a problem hiding this comment.
Document the "QR" mode please - how is it different from "RKHS"?
Contributor
|
Btw, merging with the main branch will now fix two out of the three test failures. The remaining failure is due to unit test coverage, which I suggest we do not ignore. |
11 tasks
Luthaf
reviewed
Jun 7, 2021
| by default 1e-8 | ||
| solver: string, optional | ||
| method used to solve the sparse KRR equations. | ||
| "Normal" uses a least-squares solver for the normal equations: |
Contributor
There was a problem hiding this comment.
"Normal" feels strange as a name. How about Standard or Direct or Direct Least Square?
10 tasks
force restart CI
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Implement an RKHS solver for the sparse GPR problem.
Rationale and detailed description of the changes:
Solving the GPR problem using the "normal" equation is very ill-conditioned.
This implements an alternative solver that is much better behaved.
Might be good to also include different options in terms of using solve or lstsq,
let's see where this goes - however this already works.
Tasks before review:
formatted correctly (ask @max-veit if you need help with this task).
explain the feature and its usage in plain English
to verify the fix and catch future regressions as well as similar bugs
elsewhere in the code.
make linton the project, ensure it passesmake pretty-cppandmake pretty-python, check that theauto-formatting is sensible
own branch
nbstripout