Skip to content

Add streaming, dynamic, and smoothing regression (PassiveAggressive, LmDynamic, LOWESS) #63

Description

@sipemu

Three estimators that don't fit the classical batch-OLS pattern are available but unexposed.

Scope

Method Rust path Status in 0.5.6 Description
Passive-Aggressive anofox_regression::solvers::PassiveAggressiveRegressor new in 0.5.6 Online streaming regressor (PA-I / PA-II variants) with epsilon-insensitive loss. Same family as RLS but for non-quadratic loss; tunable update aggressiveness.
Dynamic LM anofox_regression::solvers::lm_dynamic::* pre-existing, unexposed Time-varying-coefficient linear model with LOWESS weight smoothing. The natural "rolling regression" companion to OLS over time windows.
LOWESS anofox_regression::solvers::lowess::* pre-existing, unexposed Locally weighted scatterplot smoothing — nonparametric smoother for visualization or feature engineering.

Suggested user-facing names

  • passive_aggressive_fit_agg, passive_aggressive_fit_predict_by — primary surface is the streaming aggregate; emphasize compatibility with OVER (ORDER BY t).
  • lm_dynamic_fit, lm_dynamic_fit_agg, lm_dynamic_fit_predict_by — likely takes a bandwidth / kernel option.
  • lowess as a scalar/table macro (no fit/predict split — it returns a smoothed value per input row).

Prerequisite

Bump Cargo.toml: anofox-regression = "0.5.6" for PassiveAggressive. LmDynamic and LOWESS work against the current pin.

Tasks

  • Bump dependency.
  • Decide the right ergonomics for time-varying methods — window function vs aggregate vs table macro.
  • FFI + C++ wrappers.
  • SQL tests including a step-change time series for lm_dynamic, a streaming-update fixture for PassiveAggressive (verify behavior under repeated *_fit_agg over time-ordered partitions), and a noisy-scatter fixture for LOWESS.
  • README updates — likely a new section since these don't fit the linear-models table cleanly.

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