Skip to content

FIX: tiny prediciton intervals #722

Merged
merged 13 commits into from
Jun 2, 2022
Merged

FIX: tiny prediciton intervals #722

merged 13 commits into from
Jun 2, 2022

Conversation

martins0n
Copy link
Contributor

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

sem is used for variation estimation of sample mean, but we're trying to estimate interval for new sampled value so we should standard deviation intead

Related Issue

Closing issues

@github-actions
Copy link

github-actions bot commented Jun 2, 2022

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

@github-actions github-actions bot temporarily deployed to pull request June 2, 2022 10:54 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 2, 2022 11:02 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 2, 2022 11:47 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 2, 2022 12:03 Inactive
@github-actions github-actions bot temporarily deployed to pull request June 2, 2022 12:10 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Jun 2, 2022

Codecov Report

Merging #722 (cabece0) into master (901c87a) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #722      +/-   ##
==========================================
- Coverage   83.68%   83.67%   -0.01%     
==========================================
  Files         120      120              
  Lines        6630     6629       -1     
==========================================
- Hits         5548     5547       -1     
  Misses       1082     1082              
Impacted Files Coverage Δ
etna/pipeline/base.py 94.44% <100.00%> (-0.03%) ⬇️

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

@martins0n
Copy link
Contributor Author

from etna.datasets import generate_const_df, TSDataset
from etna.models import NaiveModel
from etna.pipeline import Pipeline

from copy import deepcopy
from etna.analysis import plot_forecast

df = generate_const_df(periods=200, start_time="2021-01-01", scale=0, n_segments=2, add_noise=True)

ts = TSDataset.to_dataset(df[["target", "segment", "timestamp"]])
ts = TSDataset(ts, freq="D")
ts, ts_test = ts.train_test_split(test_size=10)

pipe = Pipeline(
    model=NaiveModel(),
    transforms=[
    ],
    horizon=10
)
pipe.fit(deepcopy(ts))
forecast = pipe.forecast(True)

plot_forecast(
    forecast, test_ts=ts_test, train_ts=ts, prediction_intervals=True, n_train_samples=100
)

Before:
output-before
After:
output-after

Copy link
Contributor

@iKintosh iKintosh left a comment

Choose a reason for hiding this comment

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

Thanks

@iKintosh iKintosh merged commit d85c7f0 into master Jun 2, 2022
@iKintosh iKintosh deleted the fix-emp-intervals branch June 2, 2022 12:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants