TrigRegression

scalation.modeling.TrigRegression
See theTrigRegression companion class

The TrigRegression companion object provides factory methods and functions 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 number of harmomics

x

the original un-expanded input/data matrix

Attributes

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

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

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

Value parameters

col

the designated response column (defaults to the last column)

fname_

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to Regression.hp)

ord

the number of harmomics

xy

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

Attributes

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

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

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

Value parameters

fname_

the feature/variable names

hparam

the hyper-parameters

ord

the number of harmomics

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, w: Double): VectorD

Given a 1-vector/point 'v', compute the values for all of its trigonmetric forms/terms, returning them as a vector. '[1, sin (wt), cos (wt), sin (2wt), cos (2wt), ...]'.

Given a 1-vector/point 'v', compute the values for all of its trigonmetric forms/terms, returning them as a vector. '[1, sin (wt), cos (wt), sin (2wt), cos (2wt), ...]'.

Value parameters

k

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

nt

the number of terms

v

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

w

the base displacement angle in radians

Attributes

def numTerms(ord: Int): Int

Return the number of terms in the model.

Return the number of terms in the model.

Value parameters

ord

the number of harmomics (max k in kwt)

Attributes

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

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

Create a TrigRegression 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 Regression.hp)

ord

the number of harmomics

x

the initial data/input matrix (before term expansion)

y

the response/output m-vector

Attributes