linearRegressPenalized

Performs lasso (L1) and/or ridge (L2) penalized linear regression. Due to the way the data is standardized, no intercept term should be included in x (unlike linearRegress and linearRegressBeta). The intercept coefficient is implicitly included and returned in the first element of the returned array. Usage is otherwise identical.

Note: Setting lasso equal to zero is equivalent to performing ridge regression. This can also be done with linearRegressBeta. However, the linearRegressBeta algorithm is optimized for memory efficiency and large samples. This algorithm is optimized for large feature sets.

double[]
linearRegressPenalized
(
Y
X...
)
(
Y yIn
,
X xIn
,
double lasso
,
double ridge
)

Return Value

Type: double[]

The beta coefficients for the regression model.

References:

Friedman J, et al Pathwise coordinate optimization. Ann. Appl. Stat. 2007;2:302-332.

Goeman, J. J., L1 penalized estimation in the Cox proportional hazards model. Biometrical Journal 52(1), 70{84.

Eilers, P., Boer, J., Van Ommen, G., Van Houwelingen, H. 2001 Classification of microarray data with penalized logistic regression. Proceedings of SPIE. Progress in Biomedical Optics and Images vol. 4266, pp. 187-198

Douglas M. Hawkins and Xiangrong Yin. A faster algorithm for ridge regression of reduced rank data. Computational Statistics & Data Analysis Volume 40, Issue 2, 28 August 2002, Pages 253-262

http://en.wikipedia.org/wiki/Sherman%E2%80%93Morrison_formula

Meta