Skip to content

Add Bayesian and sparse-selection regression (BayesianRidge, ARD, LARS) #61

Description

@sipemu

Three estimators landed in anofox-regression 0.5.6 that cover the Bayesian / sparse-selection family. None is exposed by the extension today.

Scope

Method Rust path Description
Bayesian Ridge anofox_regression::solvers::BayesianRidge Bayesian linear regression with empirical-Bayes optimization of noise (σ) and regularization (λ) via evidence maximization. Gives posterior predictive variance for free — useful for prediction intervals without bootstrap.
ARD anofox_regression::solvers::ArdRegression Automatic Relevance Determination — per-feature precision priors driving redundant features toward zero. Sparse feature selection for high-dimensional regressors.
LARS anofox_regression::solvers::LarsRegressor Least Angle Regression — efficient stepwise solver that yields the full Lasso regularization path in one fit.

Suggested user-facing names

  • bayesian_ridge_fit, bayesian_ridge_fit_agg, bayesian_ridge_fit_predict_by
  • ard_fit, ard_fit_agg, ard_fit_predict_by
  • lars_fit, lars_fit_agg, lars_fit_predict_by — consider exposing the regularization path via an extra returned struct/list column.

Prerequisite

Bump Cargo.toml: anofox-regression = "0.5.6".

Tasks

  • Bump dependency.
  • FFI for each estimator; for Bayesian methods include posterior predictive variance so *_predict can populate yhat_lower / yhat_upper without bootstrap.
  • C++ aggregate/table/macro wrappers.
  • Decide how to expose the LARS path (single fit returning all knots, or *_path table function).
  • SQL tests including a high-dim sparse-truth fixture for ARD/LARS, and a noise-tunable fixture for BayesianRidge that validates the posterior variance estimate.
  • README updates.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions