-
Notifications
You must be signed in to change notification settings - Fork 81
Update DeepAR
to generate prediction intervals
#761
Conversation
🚀 Deployed on https://deploy-preview-761--etna-docs.netlify.app |
Codecov Report
@@ Coverage Diff @@
## master #761 +/- ##
==========================================
+ Coverage 83.50% 83.54% +0.03%
==========================================
Files 122 122
Lines 6748 6764 +16
==========================================
+ Hits 5635 5651 +16
Misses 1113 1113
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
etna/models/nn/deepar.py
Outdated
from typing import Union | ||
|
||
import pandas as pd | ||
from pytorch_forecasting.metrics import DistributionLoss |
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 should move it to if SETTINGS.torch_required:
block
for segment in forecast.segments: | ||
segment_slice = forecast[:, segment, :][segment] | ||
assert {"target_0.025", "target_0.975", "target"}.issubset(segment_slice.columns) | ||
assert (segment_slice["target_0.975"] - segment_slice["target_0.025"] >= 0).all() |
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.
Let's add checks if mean lower-greater than quantiles
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.
👍
IMPORTANT: Please do not create a Pull Request without creating an issue first.
Before submitting (must do checklist)
Type of Change
Proposed Changes
Look #738.
Related Issue
#738.
Closing issues
Closes #738.