Forecaster Class An S4 class providing the methods to test the trained models on provided data.
Source:R/class_Forecaster.R
Forecaster-class.RdThe object consists of 3 slots
Constructor for the S4 Forecaster object.
Arguments
- id
object identifier, must be equivalent to the id of the associated Trainer. If learning method is one of the supported by renoir, the constructor will automatically select
forecasterandselectorif they are missing.- forecaster
(optional) function used to compute predictions. Used if
idis not one of the supported by renoir. Ifforecasteris provided it must conform to the renoir common interface, and must have the following formal arguments:- object
a model for which prediction is desired. It is a Trained object as returned by the training process, where the fit is stored in the
fitslot- newx
the new values at which prediction are to be made
- type
the type of prediction required
- newoffset
if an offset was used in the fit then one must be provided
- ...
additional arguments affecting the predictions produced
- selector
(optional) helper function to select the appropriate prediction type given the response type and an accuracy measure If provided it must return a prediction type supported by
forecasterand must have the following formal arguments:- resp.type
the response type
- type.measure
the accuracy type measure, used to internally select the correct prediction type
Slots
idthe object identifier, it must be equivalent to the learning method name (i.e. the trainer id)
forecasterfunction to use to compute predictions. It must have the following formal arguments:
- object
a model for which prediction is desired. It is a Trained object as returned by the training process, where the fit is stored in the
fitslot- newx
the new values at which prediction are to be made
- type
the type of prediction required
- newoffset
if an offset was used in the fit then one must be provided
- ...
additional arguments affecting the predictions produced
selectorhelper function to select the appropriate prediction type given the response type and an accuracy measure It must have the following formal arguments:
- learning.method
the learning method, used to internally select the correct prediction type
- type.measure
the accuracy type measure, used to internally select the correct prediction type