Baseline

scalation.modeling.forecasting.Baseline
class Baseline(y: VectorD, mtype: String) extends FitM

The Baseline class supports simple baseline time series models showing their In-Sample Testing in an easy to understand tabular format. One-step ahead forecasts are produced for all but the first time point (t = 0). Currently supports "NULL", "RW". "AR1", and "AR2".

Value parameters

mtype

the type of model as a string

y

the time series vector

Attributes

See also

otexts.com/fpp3/acf.html for Auto-Correlation Function (ACF)

Graph
Supertypes
trait FitM
class Object
trait Matchable
class Any

Members list

Value members

Inherited methods

def diagnose(y: VectorD, yp: VectorD, w: VectorD): VectorD

Diagnose and return 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.

Diagnose and return 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.

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

See also

Regression_WLS Override to add more metrics.

Inherited from:
FitM
def fit: VectorD

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

Inherited from:
FitM
def help: String

Return the help string that describes the Quality of Fit (QoF) metrics/measures.

Return the help string that describes the Quality of Fit (QoF) metrics/measures.

Attributes

See also

Fit for an implementation. Override to correspond to fitLabel.

Inherited from:
FitM
def rSq0_: Double

Attributes

Inherited from:
FitM
def rSq_: Double

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
inline def smapeF(y: VectorD, yp: VectorD, e_: VectorD): Double

Return the symmetric Mean Absolute Percentage Error (sMAPE) score. Caveat: y_i = yp_i = 0 => no error => no percentage error

Return the symmetric Mean Absolute Percentage Error (sMAPE) score. Caveat: y_i = yp_i = 0 => no error => no percentage error

Value parameters

e_

the error/residual vector (if null, recompute)

y

the given time-series (must be aligned with the forecast)

yp

the forecasted time-series

Attributes

Inherited from:
FitM
def sse_: Double

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
def summary(x_: MatrixD, fname: Array[String], b: VectorD, vifs: VectorD): String

Produce a QoF summary for a model with diagnostics for each predictor 'x_j' and the overall Quality of Fit (QoF).

Produce a QoF summary for a model with diagnostics for each predictor 'x_j' and the overall Quality of Fit (QoF).

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

Inherited from:
FitM

Concrete fields

val _m: Int
val _mae: Double
val _mse0: Double
val _qof: VectorD
val _rSq: Double
val _rmse: Double
val _sde: Double
val _smape: Double
val _sse: Double
val _sst: Double
val e: VectorD
val hdr: VectorS
val mm: Int
val qof: VectorD
val r: Double
val r1: Double
val r2: Double
val se: VectorD
val t: VectorD
val x: MatrixD
val y_: VectorD
val y_bar: Double
val ybar: Double
val yp: VectorD