ForecastTensor

scalation.modeling.forecasting.multivar.ForecastTensor
trait ForecastTensor(y: MatrixD, hh: Int, tRng: Range)

The ForecastTensor trait provides a common framework for holding forecasts over time and multiple horizons.

Value parameters

hh

the maximum forecasting horizon (h = 1 to hh)

tRng

the time vector, if relevant (index as time may suffice)

y

the multi-variate time series data matrix [y_tj]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class AR_Star
class VAR

Members list

Value members

Abstract methods

def diagnose(y_: VectorD, yfh: VectorD, w: VectorD): VectorD

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)

yfh

the predicted response/output vector (test/full)

Attributes

def mod_resetDF(size: Int): Unit

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

Concrete methods

def diagnoseAll(y_: MatrixD, yf: TensorD, tRng: Range, sft: Int): Unit

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)

sft

the amount of shift for yfh (FIX - ideally unify the code and remove sft)

y_

the actual multi-variate time series matrix to use in making forecasts

yf

the entire FORECAST TENSOR

Attributes

def diagnoseAll(yy: TensorD, yf: TensorD): Unit

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 TENSOR

yy

the actual response/output matrix over all horizons

Attributes

Return the diagonalized version of the forecst tensor, i.e., for each of the j-th forecast matrices 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.

Return the diagonalized version of the forecst tensor, i.e., for each of the j-th forecast matrices 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.

Value parameters

yf

the current forecast tensor

Attributes

def makeForecastTensor(y_: MatrixD, hh_: Int): TensorD

Make the full FORECAST TENSOR where (for each sheet j) 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 TENSOR where (for each sheet j) 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 multi-variate times values to use in making forecasts

Attributes