Skip to content

Update DeepAR to generate prediction intervals #761

Merged
merged 5 commits into from
Jun 21, 2022
Merged

Update DeepAR to generate prediction intervals #761

merged 5 commits into from
Jun 21, 2022

Conversation

Mr-Geekman
Copy link
Contributor

@Mr-Geekman Mr-Geekman commented Jun 20, 2022

IMPORTANT: Please do not create a Pull Request without creating an issue first.

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Type of Change

  • Examples / docs / tutorials / contributors update
  • Bug fix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves an existing feature)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Proposed Changes

Look #738.

Related Issue

#738.

Closing issues

Closes #738.

@Mr-Geekman Mr-Geekman added the enhancement New feature or request label Jun 20, 2022
@Mr-Geekman Mr-Geekman self-assigned this Jun 20, 2022
@github-actions
Copy link

github-actions bot commented Jun 20, 2022

🚀 Deployed on https://deploy-preview-761--etna-docs.netlify.app

@github-actions github-actions bot temporarily deployed to pull request June 20, 2022 13:33 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Jun 20, 2022

Codecov Report

Merging #761 (da94bef) into master (074ff20) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            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              
Impacted Files Coverage Δ
etna/models/nn/deepar.py 100.00% <100.00%> (ø)
etna/pipeline/pipeline.py 96.96% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

from typing import Union

import pandas as pd
from pytorch_forecasting.metrics import DistributionLoss
Copy link
Contributor

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()
Copy link
Contributor

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

@github-actions github-actions bot temporarily deployed to pull request June 20, 2022 22:06 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 21, 2022 07:35 Inactive
Copy link
Contributor

@martins0n martins0n left a comment

Choose a reason for hiding this comment

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

👍

@martins0n martins0n merged commit c35055e into master Jun 21, 2022
@martins0n martins0n deleted the issue-738 branch June 21, 2022 08:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Native prediction intervals for DeepAR
3 participants