MakeMatrix4TS

scalation.modeling.forecasting.MakeMatrix4TS
See theMakeMatrix4TS companion trait
object MakeMatrix4TS

The MakeMatrix4TS object provides methods for making/building matrices from lagged endogenous and exogenous variables.

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def backfill(xej: VectorD): VectorD

Backfill the zero prefix of exogenous variable j (xej) by backcasting. The zero prefix will be at least of size 1 as 0.0 is initially prepended.

Backfill the zero prefix of exogenous variable j (xej) by backcasting. The zero prefix will be at least of size 1 as 0.0 is initially prepended.

Value parameters

xej

the j-th exogenous variable vector

Attributes

Backfill the zero prefix of the exogenous variables j (xe) by backcasting. The zero prefix will be at least of size 1 as 0.0 is initially prepended.

Backfill the zero prefix of the exogenous variables j (xe) by backcasting. The zero prefix will be at least of size 1 as 0.0 is initially prepended.

Value parameters

xe

the matrix of exogenous variables

Attributes

def formNames(spec: Int, p: Int, pow: Double = ..., sp: Int = ..., start: Int = ..., ps: Int = ...): Array[String]

Form an array of names for the features included in the model. Handles all *ARY* models. The *ARX* models require custom formNames methods.

Form an array of names for the features included in the model. Handles all *ARY* models. The *ARX* models require custom formNames methods.

Value parameters

p

the number of lags for the endogenous variable (lags 1 to p)

pow

the power to raise the lagged endogenous values to (defaults to 0.0)

ps

the number of seasonal lags for the endogenous variable (lags 1 to ps)

sp

the seasonal period (time units until repetitive behavior)

spec

the number of trend terms

start

the first seasonal lag to use (not subsumed by regular lags)

Attributes

def makeMatrix4EXO(xe: MatrixD, q: Int, qp: Double, bakcast: Boolean = ...): MatrixD

Make/build a part of the input matrix consisting of the q * xe.dim2 columns for the exogenous variables.

Make/build a part of the input matrix consisting of the q * xe.dim2 columns for the exogenous variables.

Value parameters

bakcast

whether a backcasted value is prepended to the time series

q

the number of lags for each exogenous variable (lags 1 to q)

qp

the power to raise the exogensous lags to

xe

the matrix of exogenous variable values

Attributes

def makeMatrix4L(y: VectorD, p: Int, bakcast: Boolean = ...): MatrixD

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the linear LAG terms.

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the linear LAG terms.

Value parameters

bakcast

whether a backcasted value is prepended to the time series

p

the maximum lag included (inclusive)

y

the given output/response vector

Attributes

def makeMatrix4L(xy: MatrixD, p: Int, bakcast: Boolean): MatrixD

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the linear LAG terms.

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the linear LAG terms.

Value parameters

bakcast

whether a backcasted value is prepended to the time series

p

the maximum lag included (inclusive)

y

the given output/response vector

Attributes

def makeMatrix4S(y: VectorD, p: Int, sp: Int, ps: Int, bakcast: Boolean = ...): MatrixD

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the SEASONALLY lagged terms.

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the SEASONALLY lagged terms.

Value parameters

bakcast

whether a backcasted value is prepended to the time series

p

the maximum lag included (inclusive)

ps

the number of seasonal lags

sp

the seasonal period (time units until repetitive behavior)

y

the given output/response vector

Attributes

def makeMatrix4T(y: VectorD, spec: Int, lwave: Double, bakcast: Boolean = ...): MatrixD

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the TREND terms.

Given a response vector (time series) y, make/build and return an input/predictor MATRIX x for the TREND terms.

Value parameters

bakcast

whether a backcasted value is prepended to the time series

lwave

the wavelength (distance between peaks)

spec

the number of trend terms (added columns) 0 - implicit constant, 1 - linear, 2 - quadratic, 3 - sine, 4 - cosine

y

the given output/response vector

Attributes

def makeMatrix4Y(y: VectorD, hh: Int, bakcast: Boolean = ...): MatrixD

Given a response vector (time series) y, make/build and return an output/response MATRIX yy for each horizon to be forecasted (needed for DIRECT forecasting).

Given a response vector (time series) y, make/build and return an output/response MATRIX yy for each horizon to be forecasted (needed for DIRECT forecasting).

Value parameters

bakcast

whether a backcasted value is prepended to the time series

hh

the maximum forecasting horizon (h = 1 .. hh)

y

the given output/response vector

Attributes

Concrete fields

Base hyper-parameter specification for regression based time series models.

Base hyper-parameter specification for regression based time series models.

Attributes

val trend: Array[String]