How can I show error bars for a time series forecast?

Tripartio
Tripartio New Altair Community Member
edited November 5 in Community Q&A
Hello,

How can I show error bars when visualizing a time series forecast?  I can easily plot the forecast, but I do not know how to make error bars (e.g., 95% confidence interval estimates) visible. What I mean is displaying something like this (not from RapidMiner):



Regards,
Chitu

Best Answer

  • YYH
    YYH
    Altair Employee
    edited November 2021 Answer ✓
    Unfortunately we do not have such thing available now in results visualization. You may want to manually create the boundary for upper and lower limit first in the process and then plot the prediction upper& lower limit with your forecasting.

Answers

  • jwpfau
    jwpfau New Altair Community Member
    Hi,

    have a look at the first Tutorial Process of the Forecast Validation operator.
    This gives you the label and the prediction which you can easily plot.

    Greetings,
    Jonas
  • Tripartio
    Tripartio New Altair Community Member
    edited November 2021
    Hi Jonas,

    I did exactly what you said. Here is the available data for plotting:



    But I do not see anything here that can give me the kind of error bars like in the far right of the picture that I originally posted:




    Do you understand my request better now?

    Regards,
    Chitu
  • jwpfau
    jwpfau New Altair Community Member
    Hi Chitu,

    i can't see the snipboard pictures, can you try to use the community image upload instead?

    Greetings,
    Jonas
  • Tripartio
    Tripartio New Altair Community Member
    Hi Jonas,

    I have edited the messages above with images uploaded from my computer instead of linked from Snipboard. Can you see them now?

    Regards,
    Chitu
  • YYH
    YYH
    Altair Employee
    Assuming normally distributed errors, 95% prediction intervals are given by 

    y±1.96* σ, 

    where σ^2 is the estimated variance of the residuals. For the forecasted values, you can generate the prediction interval based on the formula above.

    Some other exercise in R could be helpful for understand the prediction interval
    https://stats.stackexchange.com/questions/323071/confidence-intervals-for-mean-difference-between-actuals-and-forecast?rq=1

    I think that an excellent review by Chris Chatfield regarding 
     Prediction Intervals will answer most of your questions.
  • Tripartio
    Tripartio New Altair Community Member
    Thanks, yyhuang, for your response, but that is not quite what I am asking. I am not asking for what the values of the prediction intervals are. My question is a data visualization question: how can I visualize them when I visualize a time series in RapidMiner?

    Perhaps you could suggest how to incorporate these prediction intervals into the time series visualization? I do not know how to do that, even if I know how to calculate the values.
  • YYH
    YYH
    Altair Employee
    edited November 2021 Answer ✓
    Unfortunately we do not have such thing available now in results visualization. You may want to manually create the boundary for upper and lower limit first in the process and then plot the prediction upper& lower limit with your forecasting.
  • Tripartio
    Tripartio New Altair Community Member
    yyhuang, you suggested, "You may want to manually create the boundary for upper and lower limit first in the process…". How would I do this? It seems that I would need to extract the standard deviation for each point forecast in a forecast horizon. How would I get extract this information from a RapidMiner forecast?