Skip to content

docs: add linear quantile regression recipe - #1971

Open
Siege-Cobby wants to merge 2 commits into
online-ml:mainfrom
Siege-Cobby:add-quantile-regressor
Open

docs: add linear quantile regression recipe#1971
Siege-Cobby wants to merge 2 commits into
online-ml:mainfrom
Siege-Cobby:add-quantile-regressor

Conversation

@Siege-Cobby

@Siege-Cobby Siege-Cobby commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Addresses #1423.

This replaces the standalone QuantileRegressor implementation with a documentation recipe using River's existing quantile-loss support.

The recipe shows how to perform online linear quantile regression with:

linear_model.LinearRegression(loss=optim.losses.Quantile(...))

It demonstrates conditional quantiles at multiple levels on a synthetic stream with known quantiles, and clarifies the distinction between fitted quantiles and calibrated prediction intervals.

It also documents the model-specific tree/leaf quantile approach conceptually: a tree partitions the feature space into leaves, and a quantile-aware leaf can estimate quantiles from the target distribution observed in that region.

Finally, it demonstrates conf.RegressionJackknife as River's existing estimator-agnostic interval approach, while noting that its intervals are marginal rather than feature-conditional.

No new estimator or public API is introduced. A generic feature-conditional interval or quantile method remains a separate problem.

@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 98 untouched benchmarks
⏩ 16 skipped benchmarks1


Comparing Siege-Cobby:add-quantile-regressor (ac56d56) with main (88ca463)

Open in CodSpeed

Footnotes

  1. 16 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@Siege-Cobby
Siege-Cobby force-pushed the add-quantile-regressor branch from 22a1269 to 192dd1a Compare September 2, 2026 08:35
@Siege-Cobby Siege-Cobby changed the title feat(linear_model): add QuantileRegressor docs: add linear quantile regression recipe Sep 2, 2026
@Siege-Cobby

Copy link
Copy Markdown
Contributor Author

I’ve updated this PR following the discussion in #1423:

#1423 (comment)

The PR is now recipe-only and covers both approaches discussed there:

  1. linear quantile regression using River’s existing quantile loss
  2. the tree/leaf-based quantile approach as a model-specific alternative

It also demonstrates conf.RegressionJackknife as the current estimator-agnostic interval approach, while clarifying that its intervals are marginal rather than feature-conditional.

No new estimator or public API is introduced here. I’m leaving the generic feature-conditional solution as a separate follow-up problem.

The PR is updated and ready for review.

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