Visualization for forecast decomposition #1129
Conversation
🚀 Deployed on https://deploy-preview-1129--etna-docs.netlify.app |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## master #1129 +/- ##
===========================================
- Coverage 86.97% 68.17% -18.81%
===========================================
Files 170 170
Lines 9361 9402 +41
===========================================
- Hits 8142 6410 -1732
- Misses 1219 2992 +1773
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
etna/analysis/plotters.py
Outdated
def plot_forecast_decomposition( | ||
forecast_ts: "TSDataset", | ||
test_ts: Optional["TSDataset"] = None, | ||
mode: str = ComponentsMode.per_component, |
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.
It isn't really a correct typing because ComponentsMode.per_component
isn't a string. May be ComponentsMode.per_component.value
would work.
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.
Changed
I think it is better to attach the exact script, that generated these plots. Like here. |
Can we try to make these plots like for |
etna/datasets/utils.py
Outdated
@@ -187,6 +187,11 @@ def match_target_quantiles(features: Set[str]) -> Set[str]: | |||
return {i for i in list(features) if pattern.match(i) is not None} | |||
|
|||
|
|||
def match_target_components(features: Set[str]) -> Set[str]: | |||
"""Find target components in dataframe columns.""" |
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.
We don't have any columns and dataframes inside this function. May be we should change description a little bit.
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.
Fixed
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.
Add changelog.
Look at comments above.
Regarding adding a sample script. It can be added, but right now it will create the necessary dataset manually (artificially adding components columns). It isn't very informative because this is not the intended usage of this function. |
Updated layout of charts for per-component mode. Examples in PR description are updated as well. |
Before submitting (must do checklist)
Proposed Changes
Per-component mode
Together mode
Closing issues
closes #1121