-
Notifications
You must be signed in to change notification settings - Fork 80
Fix forecast first point in CatBoostPerSegmentModel #1010
Conversation
🚀 Deployed on https://deploy-preview-1010--etna-docs.netlify.app |
Codecov Report
@@ Coverage Diff @@
## master #1010 +/- ##
==========================================
+ Coverage 85.74% 85.79% +0.04%
==========================================
Files 162 162
Lines 8616 8616
==========================================
+ Hits 7388 7392 +4
+ Misses 1228 1224 -4
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Update changelog. |
etna/models/mixins.py
Outdated
@@ -288,8 +288,7 @@ def _make_predictions_segment( | |||
model: Any, segment: str, ts: TSDataset, prediction_method: Callable, **kwargs | |||
) -> pd.DataFrame: | |||
"""Make predictions for one segment.""" | |||
segment_features = ts[:, segment, :] | |||
segment_features = segment_features.droplevel("segment", axis=1) | |||
segment_features = ts.to_pandas()[segment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have doubts that it will slow down all our per-segment models because conversion to_pandas
will happen for each segment and it isn't free (we make a copy where).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be we can make this copy only once in _make_prediction
and remember it.
Before submitting (must do checklist)
Proposed Changes
Closing issues
closes #785