Packages

object PolyORegression extends ModelFactory

The PolyORegression companion object provides factory functions and functions for creating functional forms.

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

Value Members

  1. def allForms(x: MatriD, ord: Int): 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

    ord

    the order (max degree) of the polynomial

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

    Definition Classes
    ModelFactory
  3. def apply(x: MatriD, y: VectoD, ord: Int, fname: Strings, hparam: HyperParameter, technique: RegTechnique.RegTechnique): PolyORegression

    Create a PolyORegression object from a data matrix and a response vector.

    Create a PolyORegression object from a data matrix and a response vector. This factory function provides data rescaling.

    x

    the initial data/input matrix (before polynomial term expansion)

    y

    the response/output m-vector

    ord

    the order (k) of the polynomial (max degree)

    fname

    the feature/variable names (use null for default)

    hparam

    the hyper-parameters (use null for default)

    technique

    the technique used to solve for b in x.t*x*b = x.t*y (use Cholesky for default)

    See also

    ModelFactory

  4. def apply(t: VectoD, y: VectoD, ord: Int, fname: Strings, hparam: HyperParameter, technique: RegTechnique.RegTechnique): PolyORegression

    Create a PolyORegression object from a combined data-response matrix.

    Create a PolyORegression object from a combined data-response matrix.

    t

    the initial data/input vector: t_i expands to x_i = [1, t_i, t_i2, ... t_ik]

    y

    the response/ouput vector

    ord

    the order (k) of the polynomial (max degree)

    hparam

    the hyper-parameters

    technique

    the technique used to solve for b in x.t*x*b = x.t*y

  5. def apply(xy: MatriD, ord: Int, fname: Strings = null, hparam: HyperParameter = null, technique: RegTechnique.RegTechnique = Cholesky): PolyORegression

    Create a PolyORegression object from a combined data-response matrix.

    Create a PolyORegression object from a combined data-response matrix.

    xy

    the initial combined data-response matrix (before polynomial term expansion)

    ord

    the order (k) of the polynomial (max degree)

    hparam

    the hyper-parameters

    technique

    the technique used to solve for b in x.t*x*b = x.t*y

  6. val drp: (Null, Null, RegTechnique.Value)
  7. final def flaw(method: String, message: String): Unit
    Definition Classes
    Error
  8. def forms(v: VectoD, k: Int, nt: Int): VectoD

    Given a 1-vector/point 'v', compute the values for all of its polynomial forms/terms, returning them as a vector.

    Given a 1-vector/point 'v', compute the values for all of its polynomial forms/terms, returning them as a vector.

    v

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

    k

    number of features/predictor variables (not counting intercept) = 1

    nt

    the number of terms

    Definition Classes
    PolyORegressionModelFactory
  9. def getA: MatriD

    Get the multipliers for orthogonal polynomials, matrix 'a'.

    Get the multipliers for orthogonal polynomials, matrix 'a'. FIX - collecting the 'a' matrix this way may fail for parallel processing

  10. 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)

    Definition Classes
    ModelFactory
  11. def orthogonalize(x: MatriD): (MatriD, MatriD)

    Orthogonalize the data/input matrix 'x' using Gram-Schmidt Orthogonalization, returning the a new orthogonal matrix 'z' and the orthogonalization multipliers 'a'.

    Orthogonalize the data/input matrix 'x' using Gram-Schmidt Orthogonalization, returning the a new orthogonal matrix 'z' and the orthogonalization multipliers 'a'. This will eliminate the multi-collinearity problem.

    x

    the matrix to orthogonalize

  12. def rescaleOff(): Unit

    Turn rescaling off.

    Turn rescaling off.

    Definition Classes
    ModelFactory
  13. def rescaleOn(): Unit

    Turn rescaling on.

    Turn rescaling on.

    Definition Classes
    ModelFactory