PolyRegression

scalation.modeling.PolyRegression
See thePolyRegression companion class

The PolyRegression companion object provides factory methods for creating

  • polynomial regression models and methods for creating functional forms.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def allForms(x: MatrixD, ord: Int): MatrixD

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.

Value parameters

ord

the order (max degree) of the polynomial

x

the original un-expanded input/data matrix

Attributes

def apply(xy: MatrixD, ord: Int, fname: Array[String], hparam: HyperParameter): PolyRegression

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

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

Value parameters

fname_

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to PolyRegression.hp)

ord

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

xy

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

Attributes

def apply(t: VectorD, y: VectorD, ord: Int, fname: Array[String], hparam: HyperParameter): PolyRegression

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

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

Value parameters

fname_

the feature/variable names

hparam

the hyper-parameters

ord

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

t

the initial data/input vector: t_i expands to x_i = [1, t_i, t_i^2, ... t_i^k]

y

the response/ouput vector

Attributes

def forms(v: VectorD, k: Int, nt: Int): VectorD

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.

Value parameters

k

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

nt

the number of terms

v

the 1-vector (e.g., i-th row of t) for creating forms/terms

Attributes

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

Value parameters

k

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

Attributes

def rescale(x: MatrixD, y: VectorD, ord: Int, fname: Array[String], hparam: HyperParameter): PolyRegression

Create a PolyRegression object from a data matrix and a response vector. This method provides data rescaling.

Create a PolyRegression object from a data matrix and a response vector. This method provides data rescaling.

Value parameters

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to PolyRegression.hp)

ord

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

x

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

y

the response/output m-vector

Attributes

Concrete fields

Base hyper-parameter specification for PolyRegression See polyRegressionTest for rationale of picking Cholesky

Base hyper-parameter specification for PolyRegression See polyRegressionTest for rationale of picking Cholesky

Attributes