Packages

trait Predictor extends Model

The Predictor trait provides a common framework for several types of predictors.

y = f(x; b) + e

y = response/output value x = predictor/input vector b = parameter vector e = residual/error value

A predictor is for potentially unbounded responses (real or integer). When the number of distinct responses is bounded by some relatively small integer 'k', a classifier is likely more appropriate. Note, the 'train' method (from Model) must be called first followed by 'eval'.

Linear Supertypes
Model, Error, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Predictor
  2. Model
  3. Error
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def analyze(x_: MatriD, y_: VectoD, x_e: MatriD, y_e: VectoD): Predictor

    Analyze a dataset using this model using ordinary training with the 'train' method.

    Analyze a dataset using this model using ordinary training with the 'train' method.

    x_

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

    y_

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

    x_e

    the test/full data/input matrix (impl. classes should default x_e to x)

    y_e

    the test/full response/output vector (impl. classes should default y_e to y)

  2. abstract def eval(x_e: MatriD, y_e: VectoD): Model

    Evaluate the model's Quality of Fit (QoF) as well as 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).

    Evaluate the model's Quality of Fit (QoF) as well as 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.

    x_e

    the test/full data/input matrix (impl. classes should default to x)

    y_e

    the test/full response/output vector (impl. classes should default to y)

    Definition Classes
    Model
  3. abstract def forwardSel(cols: Set[Int], index_q: Int): (Int, Predictor)

    Perform forward selection to add the most predictive variable to the existing model, returning the variable to add and the new model.

    Perform forward selection to add the most predictive variable to the existing model, returning the variable to add and the new model. May be called repeatedly.

    cols

    the columns of matrix x included in the existing model

    index_q

    index of Quality of Fit (QoF) to use for comparing quality

    See also

    Fit for index of QoF measures.

  4. abstract def getX: MatriD

    Return the 'used' data matrix 'x'.

    Return the 'used' data matrix 'x'. Mainly for derived classes where 'x' is expanded from the given columns in 'x_', e.g., QuadRegression add squared columns.

  5. abstract def getY: VectoD

    Return the 'used' response vector 'y'.

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

  6. abstract def hparameter: HyperParameter

    Return the model hyper-parameters (if none, return null).

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

    Definition Classes
    Model
  7. abstract def parameter: VectoD

    Return the vector of model parameter/coefficient values.

    Return the vector of model parameter/coefficient values.

    Definition Classes
    Model
  8. abstract def predict(z: MatriD): VectoD

    Predict the value of 'y = f(z)' by evaluating the formula 'y = b dot z', for each row of matrix 'z'.

    Predict the value of 'y = f(z)' by evaluating the formula 'y = b dot z', for each row of matrix 'z'.

    z

    the new matrix to predict (impl. classes should default z to x)

  9. abstract def predict(z: VectoD): Double

    Given a new continuous data/input vector 'z', predict the 'y'-value of 'f(z)'.

    Given a new continuous data/input vector 'z', predict the 'y'-value of 'f(z)'.

    z

    the vector to use for prediction

  10. abstract def report: String

    Return a basic report on the trained model.

    Return a basic report on the trained model.

    Definition Classes
    Model
    See also

    'summary' method for more details

  11. abstract def residual: VectoD

    Return the vector of residuals/errors.

  12. abstract def train(x_: MatriD, y_: VectoD): Model

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

    x_

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

    y_

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

    Definition Classes
    Model

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. def corrMatrix(xx: MatriD): MatriD

    Return the correlation matrix for the columns in data matrix 'xx'.

    Return the correlation matrix for the columns in data matrix 'xx'.

    xx

    the data matrix shose correlation matrix is sought

  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val modelConcept: URI

    An optional reference to an ontological concept

    An optional reference to an ontological concept

    Definition Classes
    Model
  14. def modelName: String

    An optional name for the model (or modeling technique)

    An optional name for the model (or modeling technique)

    Definition Classes
    Model
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def predict(z: VectoI): Double

    Given a new discrete data/input vector 'z', predict the 'y'-value of 'f(z)'.

    Given a new discrete data/input vector 'z', predict the 'y'-value of 'f(z)'.

    z

    the vector to use for prediction

  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def test(modelName: String, doPlot: Boolean = true): Unit

    Test the model on the full dataset (i.e., train and evaluate on full dataset).

    Test the model on the full dataset (i.e., train and evaluate on full dataset).

    modelName

    the name of the model being tested

    doPlot

    whether to plot the actual vs. predicted response

  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Model

Inherited from Error

Inherited from AnyRef

Inherited from Any

Ungrouped