Class ConstrainedLASSObyLARS
- java.lang.Object
-
- dev.nm.stat.regression.linear.lasso.ConstrainedLASSObyLARS
-
- All Implemented Interfaces:
LinearModel
public class ConstrainedLASSObyLARS extends Object implements LinearModel
This class solves the constrained form of LASSO by modified least angle regression (LARS) and linear interpolation: \[ \min_w \left \{ \left \| Xw - y \right \|_2^2 \right \}\) subject to \( \left \| w \right \|_1 \leq t \]- See Also:
- B. Efron et. al, "Least Angle Regression," The Annals of Statistics, Volume: 32(2), 407 - 499, 2004.
- T. Hastie, R. Tibshirani and J. Friedman, "The Elements of Statistical Learning: Data Mining, Inference, and Prediction (Second Edition)," New York, Springer-Verlag, 2009.
- Wikipedia: LASSO method
-
-
Constructor Summary
Constructors Constructor Description ConstrainedLASSObyLARS(ConstrainedLASSOProblem problem)Solves a constrained LASSO problem by modified least angle regression (LARS) and linear interpolation.ConstrainedLASSObyLARS(ConstrainedLASSOProblem problem, boolean demeaned, boolean normalized, double epsilon, int maxIterations)Solves a constrained LASSO problem by modified least angle regression (LARS) and linear interpolation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LMBetabeta()Gets \(\hat{\beta}\) and statistics.doubleEy(Vector x)Computes the expectation \(E(y(x))\) given an input.LMResidualsresiduals()Gets the residual analysis of an OLS regression.
-
-
-
Constructor Detail
-
ConstrainedLASSObyLARS
public ConstrainedLASSObyLARS(ConstrainedLASSOProblem problem, boolean demeaned, boolean normalized, double epsilon, int maxIterations)
Solves a constrained LASSO problem by modified least angle regression (LARS) and linear interpolation.- Parameters:
problem- a constrained LASSO problemdemeaned- an indicator of whether an intercept is included in the modelnormalized- an indicator of whether the predictors are first normalized to have unit L2 normepsilon- a precision parameter: when a number |x| ≤ ε, it is considered 0maxIterations- the maximum number of iterations
-
ConstrainedLASSObyLARS
public ConstrainedLASSObyLARS(ConstrainedLASSOProblem problem)
Solves a constrained LASSO problem by modified least angle regression (LARS) and linear interpolation.- Parameters:
problem- a constrained LASSO problem
-
-
Method Detail
-
Ey
public double Ey(Vector x)
Description copied from interface:LinearModelComputes the expectation \(E(y(x))\) given an input.- Specified by:
Eyin interfaceLinearModel- Parameters:
x- an input- Returns:
- \(E(y(x))\)
-
beta
public LMBeta beta()
Description copied from interface:LinearModelGets \(\hat{\beta}\) and statistics.- Specified by:
betain interfaceLinearModel- Returns:
- \(\hat{\beta}\) and statistics
-
residuals
public LMResiduals residuals()
Description copied from interface:LinearModelGets the residual analysis of an OLS regression.- Specified by:
residualsin interfaceLinearModel- Returns:
- the residual analysis
-
-