Class UnconstrainedLASSObyCoordinateDescent
- java.lang.Object
-
- dev.nm.stat.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.
-
-
Constructor Summary
Constructors Constructor Description UnconstrainedLASSObyCoordinateDescent(UnconstrainedLASSOProblem problem)
Solves an unconstrained LASSO problem by Coordinate Descent method.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LMBeta
beta()
Gets \(\hat{\beta}\) and statistics.double
Ey(Vector x)
Computes the expectation \(E(y(x))\) given an input.LMResiduals
residuals()
Gets the residual analysis of an OLS regression.
-
-
-
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 interfaceLinearModel
- 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 interfaceLinearModel
- 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 interfaceLinearModel
- Returns:
- the residual analysis
-
-