Options

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

TripartioTripartio Member Posts: 37 Maven
edited November 2021 in Help
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

  • Options
    yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
    edited November 2021 Solution Accepted
    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

  • Options
    jwpfaujwpfau Employee, Member Posts: 303 RM Engineering
    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
  • Options
    TripartioTripartio Member Posts: 37 Maven
    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
  • Options
    jwpfaujwpfau Employee, Member Posts: 303 RM Engineering
    Hi Chitu,

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

    Greetings,
    Jonas
  • Options
    TripartioTripartio Member Posts: 37 Maven
    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
  • Options
    yyhuangyyhuang Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 364 RM Data Scientist
    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.
  • Options
    TripartioTripartio Member Posts: 37 Maven
    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.
  • Options
    TripartioTripartio Member Posts: 37 Maven
    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?
Sign In or Register to comment.