Description Fields Methods See Also
A model for recursively predicting multiple timesteps into the future. This class implements a particular type of forecasting, where a predict method is called to predict each successive time step in order. Extend this class if you have a predict method, but not a special forecast method.
A MatrixData containing the data used in fitting of the model.
The farthest back column from the output value used in prediction.
An array of which columns are used in prediction. 1 means the column before the prediction, 2 the one before that etc.
A string with the family of stochastic noise to apply to the recursive process. Currently only accepts 'Deterministic' and 'Poisson' as values.
Fit the model for predicting. This method breaks down the fitting process into two parts, data preparation, and the model fitting.
data | - | The data to use to fit the model. This object should be a MatrixData object. |
This method must be extended. Fit the model for predicting all of the rows. Assumes the data has been put into place.
Using a model previously fit with fit
to predict the next steps
columns. This function assumes that all of the data preprocessing has already been taken care of. This function is similar to predict, except that it can predict multiple time steps into the future instead of a single timestep.
newdata | - | The data to forecast from. |
steps | - | The number of timesteps into the future to predict. |
private$output This function should both modify and return private$output.
Use a model previously fit with fit to predict. This function does not assume any data preprocessing. This function should not, in general need to be overwritten by the user. The main prediction function is predict_, so please modify that function instead if possible.
newdata | - | Optional. The data used to predict. This data should be a MatrixData object. |
Using a model previously fit with fitRow
to predict the row
th row of the next column. This function does not assume any data preprocessing. Since the predict method predicts every row at the the same time, we include this method for predicting only a single row.
newdata | - | Optional. The data use to predict. This can either be a matrix, appropriately formatted lag vector, or NULL to predict based on the data used to fit. |
row | - | The row to predict the value of. |
col | - | This is for internal use only. |
This method must be extended. Using a model previously fit with fitRow
to predict the row
th row of the next column. This function assumes that all of the data preprocessing has already been taken care of.
row | - | The row to predict the value of. |
private$output The return value should be both stored in private$output and returned using return. This should contain the results of the prediction in a Forecast object with dimensions similar to private$newdata.
This method must be extended. Using a model previously fit with fit
to predict each row of the next column. This function assumes that all of the data preprocessing has already been taken care of.
col | - | Which columns of private$output should be modified. This parameter is mainly used in forecast, but could be used to store repeated predict_ calls in a single matrix. |
private$output The return value should be both stored in private$output and returned using return. This should contain the results of the prediction in a Forecast object with dimensions similar to private$newdata.
This method must be extended. Take data
and store it in the object. This allows the data to be referenced later in predict() where newdata is NULL. It may also be helpful to put other data preparation steps in this method, so that the fit function runs more smoothly.
data | - | The data to prepare. |
This method must be extended. This function takes input data and prepares it to forecast. It should in principle, be similar to preparePredictData, but sometimes forecasting requires different preparation from prediction.
data | - | The data to prepare for forecasting from. |
private$newdata Store the processed value here, so that forecast can access it.
This method must be extended. This function takes the input data and constructs an appropriate container for the output of the model.
inputData | - | The input to the model. Used to determine properties of the container. |
steps | - | If the input data is used as part of a forecast, the number of steps is passed in case the output size depends on the number of time steps. |
This method must be extended. Take newdata
and use it to prepare the model, so that predicting doesn't need to directly reference it. This allows the model to make multiple predict_, predictRow_, or forecast calls without re-allocating the data every time.
newdata | - | The data to prepare. |
Is inherited by : MoveAheadModel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.