-
Notifications
You must be signed in to change notification settings - Fork 17
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
Feat/rkhs #354
base: master
Are you sure you want to change the base?
Conversation
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 |
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" |
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.
Document the "QR" mode please - how is it different from "RKHS"?
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. |
@@ -428,6 +429,15 @@ def train_gap_model( | |||
jitter : double, optional | |||
small jitter for the numerical stability of solving the linear system, | |||
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: |
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.
"Normal" feels strange as a name. How about Standard
or Direct
or Direct Least Square
?
force restart CI
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 lint
on the project, ensure it passesmake pretty-cpp
andmake pretty-python
, check that theauto-formatting is sensible
own branch
nbstripout