Skip to content

Add GaussianFullCov: self-contained full-covariance Gaussian estimator#73

Open
cweniger wants to merge 1 commit into
mainfrom
feature/gaussian-fullcov
Open

Add GaussianFullCov: self-contained full-covariance Gaussian estimator#73
cweniger wants to merge 1 commit into
mainfrom
feature/gaussian-fullcov

Conversation

@cweniger
Copy link
Copy Markdown
Owner

Summary

  • Introduces GaussianFullCov(StepwiseEstimator) in falcon/estimators/gaussian_fullcov.py — a clean, self-contained replacement for the Gaussian factory + LossBasedEstimator indirection
  • Gamma is resolved once at __init__ into _proposal_gamma and _posterior_gamma, eliminating the implicit (1+gamma)/gamma transformation that was buried in sample_posterior
  • gaussian.py and LossBasedEstimator are left untouched — GaussianFullCov coexists alongside the old path until it is validated and the old code is removed
  • Smoke test examples 04_gaussian and 05_linear_regression switched to falcon.estimators.GaussianFullCov

Motivation

The old Gaussian factory returned a generic LossBasedEstimator configured with GaussianPosterior. This split the full-covariance Gaussian logic across three places (gaussian.py, stepwise_base.py::LossBasedEstimator, and embedded_posterior.py), with gamma handling that was particularly hard to follow. GaussianFullCov consolidates everything into one class whose name reflects what it specifically does.

Test plan

  • Run pytest tests/test_examples_smoke.py -k 04_gaussian to confirm the example still trains end-to-end with GaussianFullCov
  • Run pytest tests/test_examples_smoke.py -k 05_linear_regression likewise
  • Confirm from falcon.estimators import GaussianFullCov works and Gaussian still resolves as before

🤖 Generated with Claude Code

…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
Copy link
Copy Markdown

codecov Bot commented May 23, 2026

Codecov Report

❌ Patch coverage is 0% with 165 lines in your changes missing coverage. Please review.
✅ Project coverage is 9.13%. Comparing base (f2b9c87) to head (b4a4f34).

Files with missing lines Patch % Lines
falcon/estimators/gaussian_fullcov.py 0.00% 164 Missing ⚠️
falcon/estimators/__init__.py 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
unit 9.13% <0.00%> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

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.

1 participant