Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when plotting confidence intervals #1559

Open
zzzrbx opened this issue Apr 4, 2024 · 0 comments
Open

Error when plotting confidence intervals #1559

zzzrbx opened this issue Apr 4, 2024 · 0 comments

Comments

@zzzrbx
Copy link

zzzrbx commented Apr 4, 2024

I'm following the tutorial on quantile regression, but there is an issue when plotting the forecast.

I'm following the tutorial on quantile regression in NeuralProphet, but there is an issue when plotting the forecast.

confidence_lv = 0.9
quantile_list = [round(((1 - confidence_lv) / 2), 2), round((confidence_lv + (1 - confidence_lv) / 2), 2)]


m = NeuralProphet(
    yearly_seasonality=True,
    weekly_seasonality=True,
    daily_seasonality=False,  
    quantiles=quantile_list,
    n_lags=30,
    epochs=10,
    n_forecasts=30,
)

m.set_plotting_backend('plotly')
metrics = m.fit(df)

df_future = m.make_future_dataframe(
    df, 
    n_historic_predictions=True,   
    periods=30, 
)

forecast = m.predict(df_future)

m.plot(forecast, forecast_in_focus=30)

I'm getting the error below. I'm not finding the parameter they mentioned anywhere in these functions above (I'm using version 0.6.2).

in NeuralProphet.plot(self, fcst, df_name, ax, xlabel, ylabel, figsize, forecast_in_focus, plotting_backend)
   1886 if len(self.config_train.quantiles) > 1:
   1887     if (self.highlight_forecast_step_n) is None and (
   1888         self.n_forecasts > 1 or self.n_lags > 0
   1889     ):  # rather query if n_forecasts >1 than n_lags>1
-> 1890         raise ValueError(
   1891             "Please specify step_number using the highlight_nth_step_ahead_of_each_forecast function"
   1892             " for quantiles plotting when auto-regression enabled."
   1893         )
   1894     if (self.highlight_forecast_step_n or forecast_in_focus) is not None and self.n_lags == 0:
   1895         log.warning("highlight_forecast_step_n is ignored since auto-regression not enabled.")

ValueError: Please specify step_number using the highlight_nth_step_ahead_of_each_forecast function for quantiles plotting when auto-regression enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant