Packages

t

scalation.analytics

ModelFactory

trait ModelFactory extends Error

The ModelFactory trait is intended for use in Model factory objects. It supports expansion of the data matrix and rescaling of data values. When the 'rescale' flag is on/true, the companion object factory 'apply' functions should rescale or normalize the data appropriately to the particular modeling technique (or even to the level of the activation function used). In ScalaTion, model constructors do not rescale, but 'apply' functions that call model constructors need to provide this option. For example,

val model1 = new Regression (x, y, fname, hparam, technique) val model2 = Regression (x, y, fname, hparam, technique)

'model1' will not have its data rescaled, while 'model2' will.

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

Value Members

  1. def allForms(x: MatriD): MatriD

    Create all forms/terms for each row/point placing them in a new matrix.

    Create all forms/terms for each row/point placing them in a new matrix.

    x

    the original un-expanded input/data matrix

  2. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  3. def forms(xi: VectoD, k: Int, nt: Int): VectoD

    Given a vector/point 'v', compute the values for all of its forms/terms, returning them as a vector (assumes Regression with intercept).

    Given a vector/point 'v', compute the values for all of its forms/terms, returning them as a vector (assumes Regression with intercept). Override for expanded columns, e.g., QuadRegression.

    xi

    the vector/point (i-th row of x) for creating forms/terms

    k

    the number of features/predictor variables (not counting intercept)

    nt

    the number of terms

  4. def numTerms(k: Int): Int

    The number of terms/parameters in the model (assumes Regression with intercept.

    The number of terms/parameters in the model (assumes Regression with intercept. Override for expanded columns, e.g., QuadRegression.

    k

    the number of features/predictor variables (not counting intercept)

  5. def rescaleOff(): Unit

    Turn rescaling off.

  6. def rescaleOn(): Unit

    Turn rescaling on.