SymLassoRegression

scalation.modeling.SymLassoRegression

The SymLassoRegression object supports symbolic ridge regression that allows variables/columns to be raised to various powers, e.g., x^2, x^3, x^.5. Note, x~^p is a column-wise power function (each column raised to p-th power). IMPORTANT: must not include INTERCEPT (column of ones) in initial data matrix), i.e., DO NOT include a column of ones in x (will cause singularity in expanded matrix). Method signatures are the as same as for SymbolicRegression, except there is NO intercept ARGUMENT.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def apply(x: MatrixD, y: VectorD, fname: Array[String], powers: Set[Double], intercept: Boolean, cross: Boolean, cross3: Boolean, hparam: HyperParameter, terms: Array[Xj2p]*): LassoRegression

Create a LassoRegression object from a data matrix and a response vector. Partial support for "Symbolic Lasso Regression" as matrix x can be raised to several powers (e.g., x^1 and x^2). Note, x^1 is automatically included.

Create a LassoRegression object from a data matrix and a response vector. Partial support for "Symbolic Lasso Regression" as matrix x can be raised to several powers (e.g., x^1 and x^2). Note, x^1 is automatically included.

Value parameters

cross

whether to include 2-way cross/interaction terms x_i x_j (defaults to true)

cross3

whether to include 3-way cross/interaction terms x_i x_j x_k (defaults to false)

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to LassoRegression.hp)

intercept

whether to include the intercept term (column of ones) _1 (defaults to true)

powers

the set of powers to raise matrix x to (defaults to null)

terms

custom terms to add into the model, e.g., Array ((0, 1.0), (1, -2.0)) adds x0 x1^(-2)

x

the initial data/input m-by-n matrix (before expansion) must not include an intercept column of all ones

y

the response/output m-vector

Attributes

See also

SymbolicRegression.buildMatrix

def cubic(x: MatrixD, y: VectorD, fname: Array[String], intercept: Boolean, cross: Boolean, cross3: Boolean, hparam: HyperParameter): LassoRegression

Create a LassoRegression object that uses multiple regression to fit a cubic surface to the data. For example in 2D, the cubic regression equation is y = b dot x + e = [b_0, ... b_k] dot [x_0, x_0^2, x_0^3, x_1, x_1^2, x_1^3, x_0x_1, x_0^2x_1, x_0*x_1^2] + e

Create a LassoRegression object that uses multiple regression to fit a cubic surface to the data. For example in 2D, the cubic regression equation is y = b dot x + e = [b_0, ... b_k] dot [x_0, x_0^2, x_0^3, x_1, x_1^2, x_1^3, x_0x_1, x_0^2x_1, x_0*x_1^2] + e

Value parameters

cross

whether to include 2-way cross/interaction terms x_i x_j (defaults to false)

cross3

whether to include 3-way cross/interaction terms x_i x_j x_k (defaults to false)

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to LassoRegression.hp)

intercept

whether to include the intercept term (column of ones) _1 (defaults to true)

x

the initial data/input m-by-n matrix (before quadratic term expansion) must not include an intercept column of all ones

y

the response/output m-vector

Attributes

def quadratic(x: MatrixD, y: VectorD, fname: Array[String], intercept: Boolean, cross: Boolean, hparam: HyperParameter): LassoRegression

Create a LassoRegression object that uses multiple regression to fit a quadratic surface to the data. For example in 2D, the quadratic regression equation is y = b dot x + e = [b_0, ... b_k] dot [x_0, x_0^2, x_1, x_1^2] + e

Create a LassoRegression object that uses multiple regression to fit a quadratic surface to the data. For example in 2D, the quadratic regression equation is y = b dot x + e = [b_0, ... b_k] dot [x_0, x_0^2, x_1, x_1^2] + e

Value parameters

cross

whether to include cross terms x_i * x_j (defaults to false)

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to LassoRegression.hp)

intercept

whether to include the intercept term (column of ones) _1 (defaults to true)

x

the initial data/input m-by-n matrix (before quadratic term expansion) must not include an intercept column of all ones

y

the response/output m-vector

Attributes

def rescale(x: MatrixD, y: VectorD, fname: Array[String], powers: Set[Double], intercept: Boolean, cross: Boolean, cross3: Boolean, hparam: HyperParameter, terms: Array[Xj2p]*): LassoRegression

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

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

Value parameters

cross

whether to include 2-way cross/interaction terms x_i x_j (defaults to true)

cross3

whether to include 3-way cross/interaction terms x_i x_j x_k (defaults to false)

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to Regression.hp)

intercept

whether to include the intercept term (column of ones) _1 (defaults to true)

powers

the set of powers to raise matrix x to (defualts to null)

terms

custom terms to add into the model, e.g., Array ((0, 1.0), (1, -2.0)) adds x0 x1^(-2)

x

the data/input m-by-n matrix (augment with a first column of ones to include intercept in model)

y

the response/output m-vector

Attributes