plot_example: Plot an example used in a prediction of a grnnForecast object
Description
This function is useful to see how the forecast has been computed. An ordinal
specifying the order of the weight has to be supplied and the function plots
the training pattern associated with that ordinal.
Usage
plot_example(forecast, position, h = 1)
Value
A ggplot object representing an example used in the prediction.
Arguments
forecast
The grnnForecast object.
position
An integer. It is an ordinal number indicating what training
pattern to plot. For instance, if position is 1 it means that the
training pattern with the greatest weight should be plotted. If
position is 2 the training pattern with the second greatest weight
is plotted and so on.
h
An integer. This value is only useful when the recursive strategy is
being used. It indicates the forecasting horizon