Skip to content

[BUG] nan in target for forecasting with prediction intervals for SARIMAX #375

Closed
1 task done
martins0n opened this issue Dec 13, 2021 · 0 comments · Fixed by #391
Closed
1 task done

[BUG] nan in target for forecasting with prediction intervals for SARIMAX #375

martins0n opened this issue Dec 13, 2021 · 0 comments · Fixed by #391
Assignees
Labels
bug Something isn't working
Milestone

Comments

@martins0n
Copy link
Contributor

martins0n commented Dec 13, 2021

🐛 Bug Report

Nan in targets of SARIMAX predictions with prediction intervals enabled. We have predicted_mean column instead.

Expected behavior

We expected forecasts in target column, not predicted_mean

How To Reproduce

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from etna.analysis.plotters import plot_forecast
from etna.datasets import TSDataset

url = r"https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv"
df = pd.read_csv(url)
usecols = ["date", "location", "new_cases_per_million"]
countries = ["Russia", "United States", "Germany", "Canada", "Italy", "Australia"]
df = df[df.location.isin(countries)][usecols]
df = df.sort_values(["date", "location"]).reset_index(drop=True)
df = df.rename(columns={"date":"timestamp", "location":"segment", "new_cases_per_million":"target"})
df = TSDataset.to_dataset(df)
ts = TSDataset(df, freq="D")

pipeline = Pipeline(model=SARIMAXModel(), transforms=[], horizon=30)
pipeline.fit(ts)
forecast_df = pipeline.forecast(prediction_interval=True)
forecast_df.head()

Environment

No response

Additional context

No response

Checklist

  • Bug appears at the latest library version
@martins0n martins0n added the bug Something isn't working label Dec 13, 2021
@martins0n martins0n self-assigned this Dec 17, 2021
@martins0n martins0n added this to the etna 1.5.0 milestone Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant