Class UnconstrainedLASSObyQP
- java.lang.Object
-
- dev.nm.stat.regression.linear.lasso.UnconstrainedLASSObyQP
-
- All Implemented Interfaces:
LinearModel
public class UnconstrainedLASSObyQP extends Object implements LinearModel
This class solves the unconstrained form of LASSO (i.e. \( \min_w \left \{ \left \| Xw - y \right \|_2^2 + \lambda * \left \| w \right \|_1 \right \} \)) by transforming it into a single quadratic programming problem with (2 * m) constraints, where m is the number of columns of the design matrix.
-
-
Constructor Summary
Constructors Constructor Description UnconstrainedLASSObyQP(UnconstrainedLASSOProblem problem)
Solves an unconstrained LASSO problem by transforming it into a single quadratic programming problem.
-
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
-
UnconstrainedLASSObyQP
public UnconstrainedLASSObyQP(UnconstrainedLASSOProblem problem)
Solves an unconstrained LASSO problem by transforming it into a single quadratic programming problem.- 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
-
-