//:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.6 * @date Tue Dec 31 14:24:47 EST 2019 * @see LICENSE (MIT style license file). * * @title Model Framework: Forecaster for Matrix Input */ package scalation.analytics package forecaster import scalation.linalgebra.{MatriD, VectoD} //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** The `ForecasterMat` trait add the 'forecast' method to `PredictorMat` subclasses * facilitating the adaption of predictive modeling techniques such as `Regression` * for use in forecasting, viz. `Regression4TS`. * Note: for forecasting, cross-validation needs to be of the rolling-validation form. * @see the 'crossValidate' method in `RollingValidation` */ trait ForecasterMat { //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** Produce a forecast for 'h' steps ahead into the future from current time 't'. * @param xe the relevant (optionally expanded) input/data matrix * @param t the "current" time to be forecasted, e.g., h = 1 => current, h = 2 => future * @param h the forecasting horizon, number of steps ahead to produce forecast */ def forecast (xe: MatriD, t: Int, h: Int = 1): Double //:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** Forecast values for all time points using 1 through 'h'-steps ahead forecasts. * Return a vector of forecasts for all time points. * @param xe the relevant (optionally expanded) input/data matrix * @param h the forecasting horizon, number of steps ahead to produce forecasts */ def forecastAll (xe: MatriD = null, h: Int = 1): VectoD = ??? } // ForecasterMat