Skip to content
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

Save in memory Cholesky decomposition to avoid re-compute it. #26

Merged
merged 4 commits into from
May 20, 2024

Conversation

PFLeget
Copy link
Owner

@PFLeget PFLeget commented May 16, 2024

Save in memory the cholesky output to avoid re-doing it for nothing.

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.09%. Comparing base (aa786f7) to head (87964d2).

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #26      +/-   ##
==========================================
+ Coverage   86.97%   87.09%   +0.11%     
==========================================
  Files           8        8              
  Lines         760      767       +7     
==========================================
+ Hits          661      668       +7     
  Misses         99       99              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PFLeget PFLeget requested a review from cmsaunders May 17, 2024 14:56
Copy link
Collaborator

@cmsaunders cmsaunders left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I think I would set self._alpha in __init__, since you could hypothetically call return_gp_predict before running initialize or _fit.

if return_cov:
if self._alpha is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's possible for self._alpha to be None here, so this check won't help avoid recomputing K. I guess you could set K = None before line 176, then do if K is None:... here.

@PFLeget PFLeget merged commit 37f4e4c into master May 20, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants