darts
darts copied to clipboard
Fix/regr model multi series
Summary
- coverts single timeseries to list of timeseries at beginning of fit/predict in regression models
- general reordering of things in RegressionModel & TorchForecastingModels methods
fit()andpredicT()- i.e. compare predict now between the two models. they are now almost identical. we could think of further factoring out the code duplication
- added component names to encoders to keep track of the encoded components inside the covariates
- abstracted away encode_train and encode_inference behavior inside models into GlobalForecastingModel methods
generate_fit_encodings()andgenerate_predict_encodings()- opens up encoding generation to public
- allows to generate the encodings in a simple/unified way through the models
- refactored parts of encoders to overwrite encoded components if they are in the input (overwriting the output not the input)
- this simplifies how we can use encoders in forecasting models (i.e. when predicting without
series, and covariates, the model loads the covariates which were saved at fitting time in the singleseriescase. The encodings were saved with these covariates and we don't want to generate duplicate encodings for inference, ...) - added fit before predict logic for encoders that require it
- some additional comments/docs where needed
- this simplifies how we can use encoders in forecasting models (i.e. when predicting without
Additional info:
- fixes CatboosModel always writing
catboost_infofiles. By default models now do not write this output
Codecov Report
Base: 93.88% // Head: 94.01% // Increases project coverage by +0.12% :tada:
Coverage data is based on head (
27bd552) compared to base (06824b2). Patch coverage: 97.86% of modified lines in pull request are covered.
Additional details and impacted files
@@ Coverage Diff @@
## master #1221 +/- ##
==========================================
+ Coverage 93.88% 94.01% +0.12%
==========================================
Files 73 73
Lines 8097 8203 +106
==========================================
+ Hits 7602 7712 +110
+ Misses 495 491 -4
| Impacted Files | Coverage Δ | |
|---|---|---|
| ...arts/models/forecasting/torch_forecasting_model.py | 87.42% <96.00%> (-0.08%) |
:arrow_down: |
| darts/utils/data/encoder_base.py | 96.22% <96.36%> (+2.53%) |
:arrow_up: |
| darts/utils/data/encoders.py | 98.88% <98.41%> (+1.67%) |
:arrow_up: |
| darts/models/forecasting/catboost_model.py | 100.00% <100.00%> (ø) |
|
| darts/models/forecasting/forecasting_model.py | 96.65% <100.00%> (+0.08%) |
:arrow_up: |
| darts/models/forecasting/regression_model.py | 98.32% <100.00%> (-0.02%) |
:arrow_down: |
| darts/utils/timeseries_generation.py | 96.15% <100.00%> (+0.28%) |
:arrow_up: |
| darts/timeseries.py | 92.34% <0.00%> (-0.06%) |
:arrow_down: |
| darts/models/forecasting/block_rnn_model.py | 98.24% <0.00%> (-0.04%) |
:arrow_down: |
| ... and 3 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.