Forecaster_D
The Forecaster_D abstract class provides a common framework for several forecasters.
Value parameters
- bakcast
-
whether a backcasted value is prepended to the time series (defaults to false)
- fname
-
the feature/variable names
- hh
-
the maximum forecasting horizon (h = 1 to hh)
- hparam
-
the hyper-parameters for models extending this abstract class
- tRng
-
the time range, if relevant (index as time may suffice)
- x
-
the input lagged time series data
- y
-
the response matrix (time series data per horizon)
Attributes
- Note
-
Forecaster_Dis dependent on Forecaster_Reg class to do feature selection. Note, thetrain_xmethod must be called first followed bytest. - Graph
-
- Supertypes
-
class Forecastertrait Forecasttrait Modeltrait ForecastMatrixclass Diagnosertrait Fittrait FitMclass Objecttrait Matchableclass AnyShow all
- Known subtypes
-
class NeuralNet_3L4TSclass ARX_Dclass NARX_SR_Dclass ARX_Quad_Dclass ARX_SR_Dclass ARY_DShow all
Members list
Value members
Abstract methods
Build an Forecaster_D model using the cols with the selected features.
Build an Forecaster_D model using the cols with the selected features.
Value parameters
- cols
-
the cols of the input matrix with selected features
- h
-
the number of the horizon
Attributes
Build a single-horizon Forecaster_Reg model using the cols with the selected features. Note: uses Forecaster_Reg as it is the base model for Forecaster_D.
Build a single-horizon Forecaster_Reg model using the cols with the selected features. Note: uses Forecaster_Reg as it is the base model for Forecaster_D.
Value parameters
- cols
-
the cols of the input matrix with selected features
- h
-
the number of the horizon
Attributes
Predict a value for y_t using the 1-step ahead forecast.
Predict a value for y_t using the 1-step ahead forecast.
y_t = b_0 + b_1 y_t-1 + b_2 y_t-2 + ... + b_p y_t-p = b dot x_t
FIX - parameter order is in conflict with AR models.
Value parameters
- t
-
the time point being predicted
- y_
-
the actual values to use in making predictions (ignored)
Attributes
Train/fit e.g., an ARY_D model to the times-series data in vector y_. Estimate the coefficient vector b for a p-th order Auto-Regressive ARY_D(p) model. Uses OLS Matrix Fatorization to determine the coefficients, i.e., the b (φ) vector.
Train/fit e.g., an ARY_D model to the times-series data in vector y_. Estimate the coefficient vector b for a p-th order Auto-Regressive ARY_D(p) model. Uses OLS Matrix Fatorization to determine the coefficients, i.e., the b (φ) vector.
Value parameters
- x_
-
the data/input matrix (e.g., full x)
- y_
-
the training/full response vector (e.g., full y)
Attributes
Concrete methods
Perform regression-based feature selection to find the most predictive variables to have in the model, returning the variables left and the new Quality of Fit (QoF) measures for all steps.
Perform regression-based feature selection to find the most predictive variables to have in the model, returning the variables left and the new Quality of Fit (QoF) measures for all steps.
Value parameters
- cross
-
indicator to include the cross-validation/validation QoF measure (defaults to "none")
- first
-
first variable to consider for elimination (default (1) assume intercept x_0 will be in any model)
- qk
-
index of Quality of Fit (QoF) to use for comparing quality
- swap
-
whether to allow a swap step (swap out a feature for a new feature in one step)
- tech
-
the type of the feature selection to use
Attributes
Forecast values for all y_.dim time points and all horizons (1 through hh-steps ahead). Record these in the FORECAST MATRIX yf, where
Forecast values for all y_.dim time points and all horizons (1 through hh-steps ahead). Record these in the FORECAST MATRIX yf, where
yf(t, h) = h-steps ahead forecast for y_t
Value parameters
- y_
-
the actual values to use in making forecasts
Attributes
Return the best model found from feature selection.
Return the best model found from feature selection.
Attributes
Return the used response/output matrix y.
Return the used response/output matrix y.
Attributes
Perform In-Sample Testing, i.e. train and test on the full data set. Return the prediction and the Quality of Fit.
Perform In-Sample Testing, i.e. train and test on the full data set. Return the prediction and the Quality of Fit.
Value parameters
- showYf
-
whether to show the forecast matrix
- skip
-
the number of initial time points to skip (due to insufficient past)
Attributes
- Definition Classes
-
Forecaster -> Model
Return the set of columns (numbers) for the features in this model.
Return the set of columns (numbers) for the features in this model.
Attributes
Models need to provide a means for updating the Degrees of Freedom (DF).
Models need to provide a means for updating the Degrees of Freedom (DF).
Value parameters
- size
-
the size of dataset (full, train, or test)
Attributes
- Definition Classes
Return the vector of parameter/coefficient values (they are model specific). Override for models with other parameters besides bb(?, 0).
Return the vector of parameter/coefficient values (they are model specific). Override for models with other parameters besides bb(?, 0).
Attributes
- Definition Classes
-
Forecaster -> Model
Predict all values (for all horizons) corresponding to the given time series vector y_. Create FORECAST MATRIX yf and return it. Note forecastAll simply returns the values produced by predictAll.
Predict all values (for all horizons) corresponding to the given time series vector y_. Create FORECAST MATRIX yf and return it. Note forecastAll simply returns the values produced by predictAll.
Value parameters
- y_
-
the actual time series values to use in making predictions
Attributes
Use rolling-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a TRAINING SET (tr) and a TESTING SET (te). as follows: [ <-- tr_size --> | <-- te_size --> ] Calls forecast for h-steps ahead out-of-sample forecasts. Return the forecasted values in the FORECAST MATRIX,.
Use rolling-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a TRAINING SET (tr) and a TESTING SET (te). as follows: [ <-- tr_size --> | <-- te_size --> ] Calls forecast for h-steps ahead out-of-sample forecasts. Return the forecasted values in the FORECAST MATRIX,.
Value parameters
- doPlot
-
whether to show the plots
- growing
-
whether the training grows as it roll or kepps a fixed size
- rc_
-
the retraining cycle (number of forecasts until retraining occurs)
Attributes
- Definition Classes
Perform regression-based feature selection to find the most predictive variables to have in the model, returning the variables left and the new Quality of Fit (QoF) measures for all steps.
Perform regression-based feature selection to find the most predictive variables to have in the model, returning the variables left and the new Quality of Fit (QoF) measures for all steps.
Value parameters
- cross
-
indicator to include the cross-validation/validation QoF measure (defaults to "none")
- first
-
first variable to consider for elimination (default (1) assume intercept x_0 will be in any model)
- h
-
the number of the horizon
- qk
-
index of Quality of Fit (QoF) to use for comparing quality
- swap
-
whether to allow a swap step (swap out a feature for a new feature in one step)
- tech
-
the type of the feature selection to use
Attributes
- See also
-
scalation.modeling.forecasting.Forecaster_Regfor index of QoF measures.scalation.modeling.FeatureSelection.selectFeaturesUnlikeselectFeaturesallows feature selection to be horizon (h) specific
Test PREDICTIONS of a forecasting model y_ = f(lags (y_)) + e and return its predictions and QoF vector. Testing may be in-sample (on the training set) or out-of-sample (on the testing set) as determined by the parameters passed in. Note: must call train before test. Must override to get Quality of Fit (QoF).
Test PREDICTIONS of a forecasting model y_ = f(lags (y_)) + e and return its predictions and QoF vector. Testing may be in-sample (on the training set) or out-of-sample (on the testing set) as determined by the parameters passed in. Note: must call train before test. Must override to get Quality of Fit (QoF).
Value parameters
- x_null
-
the data/input matrix
- y_
-
the actual testing/full response/output matrix
Attributes
Perform Train-n-Test (TnT) Testing, i.e. train and test with rolling validation.
Perform Train-n-Test (TnT) Testing, i.e. train and test with rolling validation.
Value parameters
- rc
-
the retraining cycles (how often to retrain the model)
- showYf
-
whether to show the forecast matrix
- skip
-
the number of initial time points to skip (due to insufficient past)
Attributes
- Definition Classes
Train and test the forecasting model y_ = f(y-past) + e and report its QoF and plot its predictions. Return the predictions and QoF. NOTE: must use trainNtest_x when an x matrix is used, such as in ARY_D.
Train and test the forecasting model y_ = f(y-past) + e and report its QoF and plot its predictions. Return the predictions and QoF. NOTE: must use trainNtest_x when an x matrix is used, such as in ARY_D.
Value parameters
- x_
-
the training/full data/input matrix (defaults to full x)
- xx
-
the testing/full data/input matrix (defaults to full x)
- y_
-
the training/full response/output vector (defaults to full y)
- yy
-
the testing/full response/output vector (defaults to full y)
Attributes
Inherited methods
Make the PREDICTION INTERVAL (PI) lower and upper bound vectors from the point predictions and the interval half widths.
Make the PREDICTION INTERVAL (PI) lower and upper bound vectors from the point predictions and the interval half widths.
Value parameters
- ihw
-
the vector of interval half widths (one for each prediction)
- yp
-
the vector of point predictions (y-hat)
Attributes
- Inherited from:
- Fit
Align the actual response vector for comparison with the predicted/forecasted response vector, returning a time vector and sliced response vector.
Align the actual response vector for comparison with the predicted/forecasted response vector, returning a time vector and sliced response vector.
Value parameters
- tr_size
-
the size of the initial training set
- y
-
the actual response for the full dataset (to be sliced)
Attributes
- Inherited from:
- Forecaster
Return the maximum lag used by the model (its capacity to look into the past). Models that use more than one past value to make predictions/forecasts must override this method, e.g., ARMA (2, 3) should set the cap to max(p, q) = 3.
Return the maximum lag used by the model (its capacity to look into the past). Models that use more than one past value to make predictions/forecasts must override this method, e.g., ARMA (2, 3) should set the cap to max(p, q) = 3.
Attributes
- Inherited from:
- Forecast
The standard signature for prediction does not apply to time series.
The standard signature for prediction does not apply to time series.
Attributes
- Inherited from:
- Forecast
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted. For time series, the first few predictions use only part of the model, so may be skipped.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted. For time series, the first few predictions use only part of the model, so may be skipped.
Value parameters
- w
-
the weights on the instances (defaults to null)
- y
-
the actual response/output vector to use (test/full)
- yp
-
the predicted response/output vector (test/full)
Attributes
- Definition Classes
- Inherited from:
- Diagnoser
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, for all horizons and print the results in a table. For time series, the first few predictions use only part of the model, so may be skipped. The version is for models that perform DIRECT multi-horizon forecasting.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, for all horizons and print the results in a table. For time series, the first few predictions use only part of the model, so may be skipped. The version is for models that perform DIRECT multi-horizon forecasting.
Value parameters
- yf
-
the entire FORECAST MATRIX
- yy
-
the actual response/output matrix over all horizons
Attributes
- Inherited from:
- ForecastMatrix
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, for all horizons and print the results in a table. For time series, the first few predictions use only part of the model, so may be skipped. The version is for models that perform RECURSIVE multi-horizon forecasting.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, for all horizons and print the results in a table. For time series, the first few predictions use only part of the model, so may be skipped. The version is for models that perform RECURSIVE multi-horizon forecasting.
Value parameters
- rRng
-
the time range, defaults to null (=> full time range)
- showYf
-
whether to show the forecast matrix
- y_
-
the actual response/output vector
- yf
-
the entire FORECAST MATRIX
Attributes
- Inherited from:
- ForecastMatrix
Diagnose the health of the model by computing the Quality of Fit (QoF) metrics/measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted. This method also includes PREDICTION INTERVAL (PI) metrics/measures.
Diagnose the health of the model by computing the Quality of Fit (QoF) metrics/measures, from the error/residual vector and the predicted & actual responses. For some models the instances may be weighted. This method also includes PREDICTION INTERVAL (PI) metrics/measures.
Value parameters
- low_up
-
the predicted (lower, upper) bounds vectors
- w
-
the weights on the instances (defaults to null)
- y
-
the actual response/output vector to use (test/full)
- yp
-
the point prediction mean/median
- α
-
the significance/nominal level of uncertainty (α) (defaults to 0.1, 10%)
Attributes
- See also
-
otexts.com/fpp2/prediction-intervals.html Note:
wisshould be computed separately as the bounds are matrices. - Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the predicted & actual matrix responses (output variable per column). For some models the instances may be weighted.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, from the predicted & actual matrix responses (output variable per column). For some models the instances may be weighted.
Value parameters
- w
-
the weights on the instances (defaults to null)
- yy
-
the actual response/output matrix to use (test/full)
- yyp
-
the predicted response/output matrix (test/full)
Attributes
- See also
-
Regression_WLS - Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures for both POINT PREDICTIONS and PREDICTION INTERVALS.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures for both POINT PREDICTIONS and PREDICTION INTERVALS.
Value parameters
- iα
-
the index for the main significance level out of the vector α
- low_up
-
the predicted (lower, upper) bounds matrices for various α levels (column for each α level)
- y
-
the given time-series (must be aligned with the interval forecast)
- yp
-
the point prediction mean/median
- α
-
the vector of significance levels (defaults to the K = 11 prediction intervals used by the CDC Forecast Hub)
Attributes
- Inherited from:
- Fit
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, specifically for the weighted interval score that allows using custom α levels.
Diagnose the health of the model by computing the Quality of Fit (QoF) measures, specifically for the weighted interval score that allows using custom α levels.
Value parameters
- low_up
-
the predicted (lower, upper) bounds matrices for various α levels (column for each α level)
- y
-
the given time-series (must be aligned with the interval forecast)
- yp
-
the point prediction mean/median
- α
-
the vector of significance levels (defaults to the K = 11 prediction intervals used by the CDC Forecast Hub)
Attributes
- Inherited from:
- Fit
Print the model prediction equation in readable form. Override per model.
Print the model prediction equation in readable form. Override per model.
Attributes
- Inherited from:
- Model
Print the model prediction equation in LaTex form. Override per model.
Print the model prediction equation in LaTex form. Override per model.
Attributes
- Inherited from:
- Model
Return the Quality of Fit (QoF) measures corresponding to the labels given. Note, if sse > sst, the model introduces errors and the rSq may be negative, otherwise, R^2 (rSq) ranges from 0 (weak) to 1 (strong). Override to add more quality of fit measures.
Return the Quality of Fit (QoF) measures corresponding to the labels given. Note, if sse > sst, the model introduces errors and the rSq may be negative, otherwise, R^2 (rSq) ranges from 0 (weak) to 1 (strong). Override to add more quality of fit measures.
Attributes
- Definition Classes
- Inherited from:
- Fit
Produce a vector of size hh, h = 1 to hh-steps ahead forecasts for the model, i.e., forecast the following time points: t+1, ..., t+h. Intended to work with rolling validation (analog of predict method).
Produce a vector of size hh, h = 1 to hh-steps ahead forecasts for the model, i.e., forecast the following time points: t+1, ..., t+h. Intended to work with rolling validation (analog of predict method).
Value parameters
- t
-
the time point from which to make forecasts
- y_
-
the actual values to use in making predictions
Attributes
- Inherited from:
- Forecaster
Forecast values for all y_.dim time points and all horizons (1 through hh-steps ahead). Record these in the FORECAST MATRIX yf, where
Forecast values for all y_.dim time points and all horizons (1 through hh-steps ahead). Record these in the FORECAST MATRIX yf, where
yf(t, h) = h-steps ahead forecast for y_t
Value parameters
- y_
-
the actual values to use in making forecasts
Attributes
- Inherited from:
- Forecaster
Forecast values for all y_.dim time points at horizon h (h-steps ahead). Assign into FORECAST MATRIX and return the h-steps ahead forecast. Note, predictAll provides predictions for h = 1 and for random walk the forecast across all horizons is the same. Method should be overridden for each model besides RandomWalk
Forecast values for all y_.dim time points at horizon h (h-steps ahead). Assign into FORECAST MATRIX and return the h-steps ahead forecast. Note, predictAll provides predictions for h = 1 and for random walk the forecast across all horizons is the same. Method should be overridden for each model besides RandomWalk
Value parameters
- h
-
the forecasting horizon, number of steps ahead to produce forecasts
- y_
-
the actual values to use in making forecasts
Attributes
- Inherited from:
- Forecaster
Forecast intervals for all y_.dim time points at horizon h (h-steps ahead). Create prediction intervals (two vectors) for the given time points at level p.
Forecast intervals for all y_.dim time points at horizon h (h-steps ahead). Create prediction intervals (two vectors) for the given time points at level p.
Value parameters
- h
-
the forecasting horizon, number of steps ahead to produce forecasts
- p
-
the level (1 - alpha) for the prediction interval
- y_
-
the aligned actual values to use in making forecasts
- yfh
-
the forecast vector at horizon h
Attributes
- Inherited from:
- Forecaster
Return the data matrix x concatenated with response vector y.
Return the used response/output vector y.
Return the y-transformation.
Return the used response matrix y, if needed.
Return the used response matrix y, if needed.
Attributes
- See also
-
neuralnet.PredictorMV - Inherited from:
- Model
Return the used original/untransformed response/output vector y.
Return the used original/untransformed response/output vector y.
Attributes
- Inherited from:
- Forecaster
Return the used response/output vector yb (y prepended by one backcast value).
Return the used response/output vector yb (y prepended by one backcast value).
Attributes
- Inherited from:
- Forecaster
Return the used FORECAST MATRIX yf.
Return the help string that describes the Quality of Fit (QoF) measures provided by the Fit trait. Override to correspond to fitLabel.
Return the hyper-parameters.
The log-likelihood function times -2. Override as needed.
The log-likelihood function times -2. Override as needed.
Value parameters
- ms
-
raw Mean Squared Error
- s2
-
MLE estimate of the population variance of the residuals
Attributes
- See also
- Inherited from:
- Fit
Make the full FORECAST MATRIX where the zeroth column holds the actual time series and the last column is its time/time index. Columns 1, 2, ... hh are for h steps ahead forecasts.
Make the full FORECAST MATRIX where the zeroth column holds the actual time series and the last column is its time/time index. Columns 1, 2, ... hh are for h steps ahead forecasts.
Value parameters
- hh_
-
the maximum forecasting horizon, number of steps ahead to produce forecasts
- y_
-
the actual time series vector to use in making forecasts
Attributes
- Inherited from:
- ForecastMatrix
Get the model name.
Return the mean of the squares for error (sse / df). Must call diagnose first.
Return the mean of the squares for error (sse / df). Must call diagnose first.
Attributes
- Inherited from:
- Fit
Attributes
- Inherited from:
- Forecaster
Predict a value for y_t using the 1-step ahead forecast.
Predict a value for y_t using the 1-step ahead forecast.
y_t = f (y_t-1, ...) = y_t-1 (random walk -- use previous value)
Override for other models.
Value parameters
- t
-
the time point being predicted
- y_
-
the actual values to use in making predictions
Attributes
- Inherited from:
- Forecaster
The standard signature for prediction does not apply to time series.
The standard signature for prediction does not apply to time series.
Attributes
- Inherited from:
- Forecast
Predict all values corresponding to the given time series vector y_. Update FORECAST MATRIX yf and return PREDICTION VECTOR yp as second (1) column of yf with last value removed.
Predict all values corresponding to the given time series vector y_. Update FORECAST MATRIX yf and return PREDICTION VECTOR yp as second (1) column of yf with last value removed.
Value parameters
- y_
-
the actual time series values to use in making predictions
Attributes
- See also
-
forecastAllto forecast beyond horizon h = 1. - Inherited from:
- Forecaster
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat).
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat).
Value parameters
- df_
-
the error/residual degrees of freedom
- x_
-
the testing/full data/input matrix
- α
-
the significance level α = .1 for TWO TAILS: left tail .05 | 1 - α = .90 | .05 right tail e.g., for AutoMPG, t_crit (385, 0.90) = 1.6488210657096942 t_crit (385, 0.95) = 1.966
Attributes
- See also
-
predictCIntinPredictorstats.stackexchange.com/questions/585660/what-is-the-formula-for-prediction-interval-in-multivariate-case
- Inherited from:
- Fit
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat) and each significance level.
Produce a PREDICTION INTERVAL half width for each prediction yp (y-hat) and each significance level.
Value parameters
- df_
-
the error/residual degrees of freedom
- x_
-
the testing/full data/input matrix
- α
-
the significance levels to be used (defaults to
Fit.α_)
Attributes
- Inherited from:
- Fit
Convert QoF results into an array (of size 1) of Statistic for compatibility with the crossValidate method.
Convert QoF results into an array (of size 1) of Statistic for compatibility with the crossValidate method.
Value parameters
- qof
-
the Quality of Fit (QoF) results
Attributes
- Inherited from:
- Model
Return the coefficient of determination (R^2). Must call diagnose first.
Return the coefficient of determination (R^2). Must call diagnose first.
Attributes
- Inherited from:
- FitM
Return a basic report on a trained and tested multi-variate model.
Return a basic report on a trained and tested multi-variate model.
Value parameters
- ftMat
-
the matrix of qof values produced by the
Fittrait
Attributes
- Inherited from:
- Model
Return a basic report on a trained and tested model.
Return a basic report on a trained and tested model.
Value parameters
- ftVec
-
the vector of qof values produced by the
Fittrait
Attributes
- Inherited from:
- Model
Reset the degrees of freedom to the new updated values. For some models, the degrees of freedom is not known until after the model is built.
Reset the degrees of freedom to the new updated values. For some models, the degrees of freedom is not known until after the model is built.
Value parameters
- df_update
-
the updated degrees of freedom (regression/model, error)
Attributes
- Inherited from:
- Fit
Return the vector of residuals/errors.
Screen the x-columns of matrix xy based on the two thresholds, returning the reduced matrix and the column indices/predictor variables selected.
Screen the x-columns of matrix xy based on the two thresholds, returning the reduced matrix and the column indices/predictor variables selected.
Value parameters
- dep
-
the variable/column dependency measure (defaults to correlation)
- thr1
-
the threshold used to compare the predictor x-columns to the y-column only want variables above some minimal dependency level
- thr2
-
the threshold used to compare the predictor x-columns with each other only want variables below some cut-off dependency/collinearity level
- xy
-
the [ x, y ] combined data-response matrix
Attributes
- Inherited from:
- Model
Set the number of data points/elements to skip at the beginning of a time series for purposes of diagnosis or computing a loss function. For In-Sample, the first value (time t = 0) is not forecastable without backcasting.
Set the number of data points/elements to skip at the beginning of a time series for purposes of diagnosis or computing a loss function. For In-Sample, the first value (time t = 0) is not forecastable without backcasting.
Value parameters
- skip
-
skip this many elements at the beginning of the time series
Attributes
- Inherited from:
- Diagnoser
Show the QoF metrics/measures in vector qof.
Show the QoF metrics/measures in vector qof.
Value parameters
- qof
-
the QoF metrics (e.g., for point and interval predictions/forecasts)
Attributes
- Inherited from:
- Fit
Return the slanted/diagonalized-down version of the forecast matrix where each row is at a fixed time point and, for example, the random walk model simply pushes the values down diagonals. Note unshiftDiag reverses the process. Also reset the last column that holds the time index to 0, 1, 2, 3, ...
Return the slanted/diagonalized-down version of the forecast matrix where each row is at a fixed time point and, for example, the random walk model simply pushes the values down diagonals. Note unshiftDiag reverses the process. Also reset the last column that holds the time index to 0, 1, 2, 3, ...
Value parameters
- yf
-
the current forecast matrix
Attributes
- Inherited from:
- ForecastMatrix
Return the sum of the squares for error (sse). Must call diagnose first.
Return the sum of the squares for error (sse). Must call diagnose first.
Attributes
- Inherited from:
- FitM
Compute the sum of squares errors (loss function), assuming the first 'skip' errors are zero.
Compute the sum of squares errors (loss function), assuming the first 'skip' errors are zero.
Value parameters
- y
-
the actual response vector
- yp
-
the predicted response vector (one-step ahead)
Attributes
- Inherited from:
- Diagnoser
Produce a QoF SUMMARY for a model with diagnostics for each predictor x_j and the overall Quality of Fit (QoF). Note: `Fac_Cholesky is used to compute the inverse of xtx.
Produce a QoF SUMMARY for a model with diagnostics for each predictor x_j and the overall Quality of Fit (QoF). Note: `Fac_Cholesky is used to compute the inverse of xtx.
Value parameters
- b
-
the parameters/coefficients for the model
- fname
-
the array of feature/variable names
- vifs
-
the Variance Inflation Factors (VIFs)
- x_
-
the testing/full data/input matrix
Attributes
- Definition Classes
- Inherited from:
- Fit
Get the type of the task performed by model.
Test PREDICTIONS of a forecasting model y_ = f(lags (y_)) + e and return its predictions and QoF vector. Testing may be in-sample (on the training set) or out-of-sample (on the testing set) as determined by the parameters passed in. Note: must call train before test. Must override to get Quality of Fit (QoF).
Test PREDICTIONS of a forecasting model y_ = f(lags (y_)) + e and return its predictions and QoF vector. Testing may be in-sample (on the training set) or out-of-sample (on the testing set) as determined by the parameters passed in. Note: must call train before test. Must override to get Quality of Fit (QoF).
Value parameters
- x_null
-
the data/input matrix (ignored, pass null)
- y_
-
the actual testing/full response/output vector
Attributes
- Inherited from:
- Forecaster
Given a time series y_, train the forecasting function y_ = f(lags (y_)) + e, where f(lags (y_)) is a function of the lagged values of y_, by fitting its parameters.
Given a time series y_, train the forecasting function y_ = f(lags (y_)) + e, where f(lags (y_)) is a function of the lagged values of y_, by fitting its parameters.
Value parameters
- x_null
-
the data/input matrix (ignored, pass null)
- y_
-
the testing/full response/output vector (e.g., full y)
Attributes
- Inherited from:
- Forecast
Train and test the forecasting model y_ = f(y-past) + e and report its QoF and plot its predictions. Return the predictions and QoF.
Train and test the forecasting model y_ = f(y-past) + e and report its QoF and plot its predictions. Return the predictions and QoF.
Value parameters
- y_
-
the training/full response/output vector (defaults to full y)
- yy
-
the testing/full response/output vector (defaults to full y)
Attributes
- Inherited from:
- Forecaster
Attributes
- Inherited from:
- Forecaster
Inherited fields
The optional reference to an ontological concept