Skip to content

Conversation

@SebastianAment
Copy link
Contributor

Summary:
BoTorch currently supports a naive version of leave-one-out (LOO) cross-validation, which entails generating all folds directly and evaluating the model on all folds separately.

However, for Gaussian processes, there is an efficient way to compute all LOO results (LOO predictive means and variances) with a single linear-algebraic formula with a O(n^3) complexity, whereas the naive approach takes O(n^3) per fold, so O(n^4) in total.

This commit implements the effient LOO CV method for non-ensemble BoTorch models whose prior marginal distributions are a multi-variate Normals.

Differential Revision: D88273413

@meta-cla meta-cla bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Dec 3, 2025
@meta-codesync
Copy link

meta-codesync bot commented Dec 3, 2025

@SebastianAment has exported this pull request. If you are a Meta employee, you can view the originating Diff in D88273413.

SebastianAment added a commit to SebastianAment/botorch that referenced this pull request Dec 3, 2025
…-pytorch#3098)

Summary:

BoTorch currently supports a naive version of leave-one-out (LOO) cross-validation, which entails generating all folds directly and evaluating the model on all folds separately.

However, for Gaussian processes, there is an efficient way to compute all LOO results (LOO predictive means and variances) with a single linear-algebraic formula with a O(n^3) complexity, whereas the naive approach takes O(n^3) per fold, so O(n^4) in total.

This commit implements the effient LOO CV method for non-ensemble BoTorch models whose prior marginal distributions are a multi-variate Normals.

Differential Revision: D88273413
@codecov
Copy link

codecov bot commented Dec 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.99%. Comparing base (8a6bc9e) to head (f289b11).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3098   +/-   ##
=======================================
  Coverage   99.99%   99.99%           
=======================================
  Files         219      219           
  Lines       20887    20963   +76     
=======================================
+ Hits        20886    20962   +76     
  Misses          1        1           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…-pytorch#3098)

Summary:

BoTorch currently supports a naive version of leave-one-out (LOO) cross-validation, which entails generating all folds directly and evaluating the model on all folds separately.

However, for Gaussian processes, there is an efficient way to compute all LOO results (LOO predictive means and variances) with a single linear-algebraic formula with a O(n^3) complexity, whereas the naive approach takes O(n^3) per fold, so O(n^4) in total.

This commit implements the effient LOO CV method for non-ensemble BoTorch models whose prior marginal distributions are a multi-variate Normals.

Differential Revision: D88273413
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant