LassoRegression

scalation.modeling.LassoRegression
See theLassoRegression companion class
object LassoRegression extends Regularized

The LassoRegression companion object provides factory methods for the LassoRegression class.

Attributes

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

Members list

Value members

Concrete methods

def apply(xy: MatrixD, fname: Array[String] = ..., hparam: HyperParameter = ...)(col: Int = ...): LassoRegression

Create a Lasso Regression object from a combined data matrix. This function centers the data.

Create a Lasso Regression object from a combined data matrix. This function centers the data.

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

xy

the combined data matrix

Attributes

def center(x: MatrixD, y: VectorD, fname: Array[String] = ..., hparam: HyperParameter = ...): LassoRegression

Create a Lasso Regression from a data matrix and response vector. This function centers the data.

Create a Lasso Regression from a data matrix and response vector. This function centers the data.

Value parameters

fname

the feature/variable names (defaults to null)

hparam

the shrinkage hyper-parameter (0 => OLS) in the penalty term 'lambda * |b|'

x

the un-centered data/input m-by-n matrix, NOT augmented with a first column of ones

y

the un-centered response/output vector

Attributes

def rescale(x: MatrixD, y: VectorD, fname: Array[String] = ..., hparam: HyperParameter = ...): LassoRegression

Create a Lasso Regression object from a data matrix and a response vector. This method provides data rescaling on x and centering on y.

Create a Lasso Regression object from a data matrix and a response vector. This method provides data rescaling on x and centering on y.

Value parameters

fname

the feature/variable names (defaults to null)

hparam

the hyper-parameters (defaults to hp)

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

def sparsify(b: VectorD, relThresh: Double = ...): Unit

Zero out small parameters/coefficients in the model that are below a threshold. Intended for use by any regularized regression, but especially Lasso and Bridge.

Zero out small parameters/coefficients in the model that are below a threshold. Intended for use by any regularized regression, but especially Lasso and Bridge.

Value parameters

b

the parameters/coefficients to sparsify

relThresh

the relative (to the max) threshold below which parameter is set to zero

Attributes

Returns

a sparse version of the parameter vector

Concrete fields