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

Members list

Value members

Abstract methods

def getFname: Array[String]

Return the feature/variable names.

Return the feature/variable names.

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