ARX

scalation.modeling.forecasting.ARX
See theARX companion class
object ARX

The ARX companion object provides factory methods.

Attributes

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

Members list

Value members

Concrete methods

def apply(y: VectorD, lags: Int, hparam: HyperParameter): ARX

Create an ARX object from a response vector. The input/data matrix x is formed from the lagged y vectors as columns in matrix x.

Create an ARX object from a response vector. The input/data matrix x is formed from the lagged y vectors as columns in matrix x.

Value parameters

hparam

the hyper-parameters (use Regression.hp for default)

lags

the maximum lag included (inclusive)

y

the original un-expanded output/response vector

Attributes

def exo(y: VectorD, lags: Int, ex: MatrixD, hparam: HyperParameter)(elag1: Int, elag2: Int): ARX

Create an ARX object from a response vector. The input/data matrix x is formed from the lagged y vectors as columns in matrix x. In addition, lagged exogenous variables are added.

Create an ARX object from a response vector. The input/data matrix x is formed from the lagged y vectors as columns in matrix x. In addition, lagged exogenous variables are added.

Value parameters

elag1

the minimum exo lag included (inclusive)

elag2

the maximum exo lag included (inclusive)

hparam

the hyper-parameters (use Regression.hp for default)

lags

the maximum lag included (inclusive)

y

the original un-expanded output/response vector

Attributes

def makeExoCols(lags: Int, ex: MatrixD, elag1: Int, elag2: Int): MatrixD

Make a matrix whose columns are lagged exogenous variables to be added to a data matrix.

Make a matrix whose columns are lagged exogenous variables to be added to a data matrix.

Value parameters

elag1

the minimum exo lag included (inclusive)

elag2

the maximum exo lag included (inclusive)

ex

the matrix of data for the exogenous variables

lags

the maximum lag included (inclusive) for checking purposes

Attributes

def rollValidate(mod: Predictor & Fit, rc: Int): Unit

Use rolling-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a TESTING SET (tr) and a TRAINING SET (te) as follows: [ <-- tr_size --> | <-- te_size --> ] This version calls predict for one-step ahead out-of-sample forecasts.

Use rolling-validation to compute test Quality of Fit (QoF) measures by dividing the dataset into a TESTING SET (tr) and a TRAINING SET (te) as follows: [ <-- tr_size --> | <-- te_size --> ] This version calls predict for one-step ahead out-of-sample forecasts.

Value parameters

mod

the forecasting model being used (e.g., ARX)

rc

the retraining cycle (number of forecasts until retraining occurs)

Attributes

See also

RollingValidation

def setTrend(trend: Boolean): Unit

Set whether to include a simple linear (in time) trend.

Set whether to include a simple linear (in time) trend.

Value parameters

trend

flag indicating whether to include a trend

Attributes

def split_TnT(x: MatrixD, y: VectorD, ratio: Double): (MatrixD, VectorD, MatrixD, VectorD)

Split the x matrix and y vector into training and testing sets.

Split the x matrix and y vector into training and testing sets.

Value parameters

ratio

the ratio of the TESTING set to the full dataset (most common 70-30, 80-20)

x

the x data/input matrix

y

the y response/output vector

Attributes