Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/encoders extension #1093

Merged
merged 12 commits into from Aug 10, 2022
Merged

Feat/encoders extension #1093

merged 12 commits into from Aug 10, 2022

Conversation

dennisbader
Copy link
Collaborator

Fixes #693.

Summary

  • adds encoder support for RegressionModels. Add encoders with model creation parameter add_encoders (as already available for TorchForecastingModels)

@codecov-commenter
Copy link

codecov-commenter commented Aug 7, 2022

Codecov Report

Merging #1093 (3c7b9a4) into master (df4e2d7) will increase coverage by 0.01%.
The diff coverage is 95.12%.

@@            Coverage Diff             @@
##           master    #1093      +/-   ##
==========================================
+ Coverage   93.71%   93.72%   +0.01%     
==========================================
  Files          80       80              
  Lines        8236     8250      +14     
==========================================
+ Hits         7718     7732      +14     
  Misses        518      518              
Impacted Files Coverage Δ
darts/models/forecasting/catboost_model.py 100.00% <ø> (ø)
darts/models/forecasting/gradient_boosted_model.py 100.00% <ø> (ø)
...arts/models/forecasting/linear_regression_model.py 94.91% <ø> (ø)
darts/models/forecasting/random_forest.py 100.00% <ø> (ø)
darts/models/forecasting/ensemble_model.py 92.30% <50.00%> (-1.70%) ⬇️
darts/models/forecasting/forecasting_model.py 96.16% <91.66%> (-0.20%) ⬇️
darts/models/forecasting/regression_model.py 97.67% <100.00%> (+0.19%) ⬆️
...arts/models/forecasting/torch_forecasting_model.py 88.66% <100.00%> (-0.08%) ⬇️
darts/timeseries.py 92.23% <0.00%> (-0.07%) ⬇️
... and 4 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Contributor

@hrzn hrzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great improvement 🚀 😍
Thanks!

@@ -59,14 +51,10 @@
(FFT(trend="poly"), 11.4),
(NaiveSeasonal(), 32.4),
(KalmanForecaster(dim_x=3), 17.0),
(LinearRegressionModel(lags=12), 11.0),
(RandomForest(lags=12, n_estimators=200, max_depth=3), 15.5),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't n_estimators=200 a bit too much for a unit test? This doesn't take too long?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just took this from a few lines below, tbh. I can reduce it.

@@ -361,6 +423,15 @@ def fit(
**kwargs
Additional keyword arguments passed to the `fit` method of the model.
"""

self.encoders = self.initialize_encoders()
if self.encoders.encoding_available:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat 👌


logger = get_logger(__name__)

try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@dennisbader dennisbader merged commit a93296b into master Aug 10, 2022
@dennisbader dennisbader deleted the feat/encoders_extension branch August 10, 2022 20:48
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.

Encoders for RegressionModels
3 participants