# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.stats.regression.linear.lasso

## Class UnconstrainedLASSObyCoordinateDescent

• java.lang.Object
• com.numericalmethod.suanshu.stats.regression.linear.lasso.UnconstrainedLASSObyCoordinateDescent
• All Implemented Interfaces:
LinearModel

public class UnconstrainedLASSObyCoordinateDescent
extends Object
implements LinearModel
This class solves the unconstrained form of LASSO, that is, $\min_w \left \{ \left \| Xw - y \right \|_2^2 + \lambda * \left \| w \right \|_1 \right \}$ by Coordinate Descent method.
"Li, Yingying and Osher, Stanley, "Coordinate Descent Optimization for L1 Minimization with Application to Compressed Sensing; A Greedy Algorithm," 2009."
• ### Constructor Detail

• #### UnconstrainedLASSObyCoordinateDescent

public UnconstrainedLASSObyCoordinateDescent(UnconstrainedLASSOProblem problem)
Solves an unconstrained LASSO problem by Coordinate Descent method.
Parameters:
problem - an unconstrained LASSO problem
• ### Method Detail

• #### Ey

public double Ey(Vector x)
Description copied from interface: LinearModel
Computes the expectation $$E(y(x))$$ given an input.
Specified by:
Ey in interface LinearModel
Parameters:
x - an input
Returns:
$$E(y(x))$$
• #### beta

public LMBeta beta()
Description copied from interface: LinearModel
Gets $$\hat{\beta}$$ and statistics.
Specified by:
beta in interface LinearModel
Returns:
$$\hat{\beta}$$ and statistics
• #### residuals

public LMResiduals residuals()
Description copied from interface: LinearModel
Gets the residual analysis of an OLS regression.
Specified by:
residuals in interface LinearModel
Returns:
the residual analysis