darts icon indicating copy to clipboard operation
darts copied to clipboard

Classification forecasting for regression models

Open jonasblanc opened this issue 8 months ago • 1 comments

Checklist before merging this PR:

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

Fixes #1473, Fixes #2315

Summary

Done:

  • Add support for categorical target series (refactor RegressionModelWithCategoricalCovariates into RegressionModelWithCategoricalFeatures)
  • _ForecastingClassifierMixin for methods specific to forecasting classifier models.
  • Support sklearn like classifier through SklearnClassifierModel
  • Implement specific model for XGBoost, LightGBM, Catboost classifiers
  • Support multi-labels classification through MultiOutputClassifier (implement MultiOutputMixin to extend both MultiOutputClassifier and MultiOutputRegressor)
  • Extend tests to cover classification forecasting
  • Implement ClassProbabilityLikelihood to predict class probabilities on predict_likelihood_parameters, make it default likelihood for classifier models.

TODO: For future PR:

  • Implement classification scores
  • Write a notebook on classification forecasting

Other Information

jonasblanc avatar Apr 07 '25 08:04 jonasblanc

Codecov Report

Attention: Patch coverage is 98.97611% with 3 lines in your changes missing coverage. Please review.

Project coverage is 95.14%. Comparing base (8fe6985) to head (372b14c). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
darts/models/__init__.py 57.14% 3 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2765      +/-   ##
==========================================
- Coverage   95.18%   95.14%   -0.04%     
==========================================
  Files         146      146              
  Lines       15342    15541     +199     
==========================================
+ Hits        14603    14787     +184     
- Misses        739      754      +15     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Apr 07 '25 09:04 codecov[bot]