Add GaussianFullCov: self-contained full-covariance Gaussian estimator#73
Open
cweniger wants to merge 1 commit into
Open
Add GaussianFullCov: self-contained full-covariance Gaussian estimator#73cweniger wants to merge 1 commit into
cweniger wants to merge 1 commit into
Conversation
…class Introduces GaussianFullCov in falcon/estimators/gaussian_fullcov.py, replacing the Gaussian factory + LossBasedEstimator indirection for the full-covariance Gaussian case. Key improvements: - Gamma resolved once at __init__ (_proposal_gamma / _posterior_gamma), eliminating the implicit (1+gamma)/gamma transformation scattered across call sites - All model building, training, sampling, and save/load logic lives in one class with no generic wrapper in between - gaussian.py and LossBasedEstimator are left untouched for now Smoke test examples 04_gaussian and 05_linear_regression updated to use falcon.estimators.GaussianFullCov. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
========================================
- Coverage 9.50% 9.13% -0.38%
========================================
Files 32 33 +1
Lines 3975 4140 +165
========================================
Hits 378 378
- Misses 3597 3762 +165
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 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.
Summary
GaussianFullCov(StepwiseEstimator)infalcon/estimators/gaussian_fullcov.py— a clean, self-contained replacement for theGaussianfactory +LossBasedEstimatorindirection__init__into_proposal_gammaand_posterior_gamma, eliminating the implicit(1+gamma)/gammatransformation that was buried insample_posteriorgaussian.pyandLossBasedEstimatorare left untouched —GaussianFullCovcoexists alongside the old path until it is validated and the old code is removed04_gaussianand05_linear_regressionswitched tofalcon.estimators.GaussianFullCovMotivation
The old
Gaussianfactory returned a genericLossBasedEstimatorconfigured withGaussianPosterior. This split the full-covariance Gaussian logic across three places (gaussian.py,stepwise_base.py::LossBasedEstimator, andembedded_posterior.py), with gamma handling that was particularly hard to follow.GaussianFullCovconsolidates everything into one class whose name reflects what it specifically does.Test plan
pytest tests/test_examples_smoke.py -k 04_gaussianto confirm the example still trains end-to-end withGaussianFullCovpytest tests/test_examples_smoke.py -k 05_linear_regressionlikewisefrom falcon.estimators import GaussianFullCovworks andGaussianstill resolves as before🤖 Generated with Claude Code