object SimpleRollingValidation
The SimpleRollingValidation
object provides '1'-fold rolling validations, e.g.,
for 'm = 1200' and 'k = 1', 'kt = 5':
1: tr(ain) 0 until 600, te(st) 600 until 1200
In rolling validation for this case, each retraining dataset has 600 instances, while the testing dataset has 600. Re-training occurs before every 'kt = 2' forecasts are made.
- Alphabetic
- By Inheritance
- SimpleRollingValidation
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
def
crossValidate(model: PredictorMat with ForecasterMat, kt_: Int = 5, h: Int = 1): Array[Statistic]
Use rolling '1'-fold cross-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a test dataset and a training dataset.
Use rolling '1'-fold cross-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a test dataset and a training dataset. The test dataset is defined by a range of indices (test start until start + 'te_size') and 'tr_size' of the data before this is the training dataset. ------------------------------------------------------------------------- This version is for models that have an 'x' component and 'y' component, e.g.,
Regression4TS
.- model
the forecastering model being used (e.g.,
QuadRegression4TS
)- kt_
the frequency of re-training (number of forecasts to make before re-training) (defaults to 5)
- h
the forecasting horizon, number of steps ahead to produce forecasts (defaults to 1)
- See also
PredictorMat with ForecasterMat
for the types of modelsanalytics.package.scala for 'chopr' and 'shift_r' methods
-
def
crossValidate2(model: ForecasterVec, kt_: Int = 5, h: Int = 1): Array[Statistic]
Use rolling '1'-fold cross-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a test dataset and a training dataset.
Use rolling '1'-fold cross-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a test dataset and a training dataset. The test dataset is defined by a range of indices (test start until start + 'te_size') and 'tr_size' of the data before this is the training dataset. ------------------------------------------------------------------------- This version is for models that have no 'x' component, only the 'y' component, e.g.,
AR
.- model
the forecastering model being used (e.g.,
ARIMA
)- kt_
the frequency of re-training (number of forecasts to make before re-training) (defaults to 5)
- h
the forecasting horizon, number of steps ahead to produce forecasts (defaults to 1)
- See also
ForecasterVec
for the types of modelsanalytics.package.scala for 'chopr' and 'shift_r' methods
-
def
crossValidate3(model: PredictorMat2 with ForecasterMat, kt_: Int = 50, h: Int = 1): Array[Statistic]
Use rolling '1'-fold cross-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a test dataset and a training dataset.
Use rolling '1'-fold cross-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a test dataset and a training dataset. The test dataset is defined by a range of indices (test start until start + 'te_size') and 'tr_size' of the data before this is the training dataset. ------------------------------------------------------------------------- This version is for models that have an 'x' component and 'y' component, e.g.,
NeuralNet_3L1_4TS
.- model
the forecastering model being used (e.g.,
NeuralNet_3L1_4TS
)- kt_
the frequency of re-training (number of forecasts to make before re-training) (defaults to 50)
- h
the forecasting horizon, number of steps ahead to produce forecasts (defaults to 1)
- See also
PredictorMat2 with ForecasterMat
for the types of modelsanalytics.package.scala for 'chopr' and 'shift_r' methods
-
def
trSize(m: Int): Int
Calculate the size (number of instances) for a training dataset.
Calculate the size (number of instances) for a training dataset.
- m
the size of the full dataset