Skip to content

[Feature] CatBoost MultiQuantile support#3032

Open
daidahao wants to merge 18 commits intounit8co:masterfrom
daidahao:feature/catboost-multiquantile
Open

[Feature] CatBoost MultiQuantile support#3032
daidahao wants to merge 18 commits intounit8co:masterfrom
daidahao:feature/catboost-multiquantile

Conversation

@daidahao
Copy link
Contributor

@daidahao daidahao commented Feb 27, 2026

Checklist before merging this PR:

  • Mentioned all issues that this PR fixes or addresses.
  • Summarized the updates of this PR under Summary.
  • Added an entry under Unreleased in the Changelog.

Fixes #2967.

Summary

I asked Codex for a quick summary:

  • Adds native multi-quantile support for CatBoostModel by using CatBoost’s MultiQuantile loss (loss_function="MultiQuantile:alpha=...") instead of training one model per quantile.
  • Updates quantile handling in the sklearn likelihood path so prediction works both when:
    • quantiles are stored in _model_container (old behaviour for non-catboost models), and
    • quantiles come directly from one native model output (new CatBoost behaviour).

Practical impact

  • CatBoostModel quantile training should be faster/simpler (single native multi-quantile model path where supported).
  • Existing quantile workflows remain supported for other models via fallback container-based logic.

Usage

import time

from darts.datasets import AirPassengersDataset
from darts.models import CatBoostModel

series = AirPassengersDataset().load()
train, val = series[:-36], series[-36:]
model = CatBoostModel(
    lags=12,
    output_chunk_length=6,
    likelihood="quantile",
    quantiles=[0.1, 0.5, 0.9],
)

start_time = time.perf_counter()
model.fit(series)
print(f"Training time: {time.perf_counter() - start_time:.2f} seconds")
"""
CatBoost without MultiQuantile:
Training time: 4.21 seconds

CatBoost with MultiQuantile:
Training time: 2.51 seconds
"""

Other Information

Feat: add multi-quantile support for CatBoost model and update
likelihood handling.

Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

❌ Patch coverage is 94.11765% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.67%. Comparing base (fdce8f2) to head (7f21c20).

Files with missing lines Patch % Lines
darts/models/forecasting/catboost_model.py 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3032      +/-   ##
==========================================
- Coverage   95.75%   95.67%   -0.08%     
==========================================
  Files         158      158              
  Lines       17181    17186       +5     
==========================================
- Hits        16451    16443       -8     
- Misses        730      743      +13     

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

Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@daidahao daidahao marked this pull request as ready for review February 27, 2026 19:27
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
Co-authored-by: Zhihao Dai <zhihao.dai@eng.ox.ac.uk>
@dennisbader
Copy link
Collaborator

Thanks a lot @daidahao 🚀 I'll be out of office next week but will have a look once I'm back :)

@daidahao
Copy link
Contributor Author

@dennisbader
Any update on this? Thanks!

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.

Use CatBoost MultiQuantile regression

2 participants