object SimpleRegression extends ModelFactory
The SimpleRegression
companion object provides a simple factory method
for building simple regression linear regression models.
- Alphabetic
- By Inheritance
- SimpleRegression
- ModelFactory
- Error
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- 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
- def apply(x: VectoD, y: VectoD, fname: Strings, hparam: HyperParameter): SimpleRegression
Create a Simple Linear Regression model, automatically prepending the column of ones (form matrix from two column vectors [1 x]).
Create a Simple Linear Regression model, automatically prepending the column of ones (form matrix from two column vectors [1 x]).
- x
the data/input m-by-1 vector
- y
the response/output m-vector
- fname
the feature/variable names
- hparam
the hyper-parameters (currently has none)
- def apply(xy: MatriD, fname: Strings = null, hparam: HyperParameter = null): SimpleRegression
Create a Simple Linear Regression model from a combined data matrix.
Create a Simple Linear Regression model from a combined data matrix. When 'xy.dim2 == 2', a column of all ones will be prepended to the matrix corresponding to the intercept (form matrix from two column vectors [1 x]). Take the first two columns for the predictor and the last column for the response.
- xy
the combined data matrix
- fname
the feature/variable names
- hparam
the hyper-parameters (currently has none)
- See also
SimplerRegression
for a model without an intercept parameter
- val drp: (Null, Null)
- final def flaw(method: String, message: String): Unit
- Definition Classes
- Error
- 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
- Definition Classes
- ModelFactory
- 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
- def rescaleOff(): Unit
Turn rescaling off.
Turn rescaling off.
- Definition Classes
- ModelFactory
- def rescaleOn(): Unit
Turn rescaling on.
Turn rescaling on.
- Definition Classes
- ModelFactory