Model

scalation.modeling.Model
trait Model

The Model trait provides a common framework for all models and serves as base trait for Classifier, Forecaster, Predictor, and PredictorMV traits. The train and test methods must be called first, e.g., val model = NullModel (y) model.train (null, y) model.test (null, y)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Classifier
class BaggingTrees
class RandomForest
class HiddenMarkov
class NaiveBayes
class NaiveBayesR
class NullModel
class SimpleLDA
class TANBayes
class VAR
class Forecaster
class AR
class ARMA
class ARIMA
class Forecaster_D
class ARX_D
class ARX_Quad_D
class ARX_Symb_D
class ARY_D
class ARX
class ARX_Quad
class ARX_Symb
class ARY
class ARY_Quad
class SARY
class NullModel
class RandomWalk
class RandomWalkS
class TranARY
class TrendModel
trait Forecaster
class AR
class AR1MA
class ARIMA
class ARMA
class NullModel
class QuadSpline
class RandomWalk
class TrendModel
trait ForecasterX
class ARX
class ARX_Quad
class CNN_2D
trait PredictorMV
class CNN_1D
class NeuralNet_2L
class NeuralNet_3L
class NeuralNet_XL
class RegressionMV
trait Predictor
class ELM_3L1
class NullModel
class Perceptron
class Regression
Show all

Members list

Value members

Abstract methods

def crossValidate(k: Int, rando: Boolean): Array[Statistic]
def getFname: Array[String]

Return the feature/variable names.

Return the feature/variable names.

Attributes

def getX: MatrixD

Return the used data matrix x. Mainly for derived classes where x is expanded from the given columns in x_, e.g., SymbolicRegression.quadratic adds squared columns.

Return the used data matrix x. Mainly for derived classes where x is expanded from the given columns in x_, e.g., SymbolicRegression.quadratic adds squared columns.

Attributes

def getY: VectorD

Return the used response vector y. Mainly for derived classes where y is transformed, e.g., TranRegression, ARX.

Return the used response vector y. Mainly for derived classes where y is transformed, e.g., TranRegression, ARX.

Attributes

Return the model hyper-parameters (if none, return null). Hyper-parameters may be used to regularize parameters or tune the optimizer.

Return the model hyper-parameters (if none, return null). Hyper-parameters may be used to regularize parameters or tune the optimizer.

Attributes

Return the vector of model parameter/coefficient values. Single output models have VectorD parameters, while multi-output models have MatrixD.

Return the vector of model parameter/coefficient values. Single output models have VectorD parameters, while multi-output models have MatrixD.

Attributes

def predict(z: VectorD): Double | VectorD

Predict the value of y = f(z) by evaluating the model equation. Single output models return Double, while multi-output models return VectorD.

Predict the value of y = f(z) by evaluating the model equation. Single output models return Double, while multi-output models return VectorD.

Value parameters

z

the new vector to predict

Attributes

def test(x_: MatrixD, y_: VectorD): (VectorD, VectorD)

Test/evaluate the model's Quality of Fit (QoF) and return the predictions and QoF vectors. This may include the importance of its parameters (e.g., if 0 is in a parameter's confidence interval, it is a candidate for removal from the model). Extending traits and classess should implement various diagnostics for the test and full (training + test) datasets.

Test/evaluate the model's Quality of Fit (QoF) and return the predictions and QoF vectors. This may include the importance of its parameters (e.g., if 0 is in a parameter's confidence interval, it is a candidate for removal from the model). Extending traits and classess should implement various diagnostics for the test and full (training + test) datasets.

Value parameters

x_

the testiing/full data/input matrix (impl. classes may default to x)

y_

the testiing/full response/output vector (impl. classes may default to y)

Attributes

def train(x_: MatrixD, y_: VectorD): Unit

Train the model 'y_ = f(x_) + e' on a given dataset, by optimizing the model parameters in order to minimize error '||e||' or maximize log-likelihood 'll'.

Train the model 'y_ = f(x_) + e' on a given dataset, by optimizing the model parameters in order to minimize error '||e||' or maximize log-likelihood 'll'.

Value parameters

x_

the training/full data/input matrix (impl. classes may default to x)

y_

the training/full response/output vector (impl. classes may default to y)

Attributes

Concrete methods

def getYY: MatrixD

Return the used response matrix y, if needed.

Return the used response matrix y, if needed.

Attributes

See also

neuralnet.PredictorMV

def report(ftVec: VectorD): String

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 Fit trait

Attributes

def report(ftMat: MatrixD): String

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 Fit trait

Attributes

Concrete fields

var modelConcept: URI

The optional reference to an ontological concept

The optional reference to an ontological concept

Attributes

var modelName: String

The name for the model (or modeling technique).

The name for the model (or modeling technique).

Attributes