public class LARSProblem extends LMProblem
Constructor and Description |
---|
LARSProblem(LARSProblem that)
Copy constructor.
|
LARSProblem(Vector y,
Matrix X)
Constructs a LASSO variation of the Least Angel Regression (LARS)
problem, where an intercept is included in the model and the covariates
are normalized first.
|
LARSProblem(Vector y,
Matrix X,
boolean lasso)
Constructs a Least Angel Regression (LARS) problem, where an intercept is
included in the model and the covariates are normalized first.
|
LARSProblem(Vector y,
Matrix X,
boolean normalized,
boolean lasso)
Constructs a Least Angel Regression (LARS) problem, where an intercept is
included in the model.
|
LARSProblem(Vector y,
Matrix X,
boolean intercept,
boolean normalized,
boolean lasso)
Constructs a Least Angel Regression (LARS) problem.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isLASSO()
Checks if the LASSO variation of LARS is used.
|
int |
m()
Gets the number of covariates (number of columns of X), excluding
the intercept.
|
Vector |
XL2Norm()
Gets the L2 norms of the covariates (a vector of ones if no
standardization is required).
|
Matrix |
XLARS()
Gets the matrix of covariates (possibly demeaned and/or scaled) to be
used in LARS.
|
Vector |
XMean()
Gets the mean vector to be subtracted from the covariates (a vector of
zeros if no intercept is included).
|
Vector |
yLARS()
Gets the vector of response variable (possibly demeaned) to be used in
LARS.
|
double |
yMean()
Gets the mean to be subtracted from the response variable (0 if no
intercept is included).
|
A, checkInputs, intercept, invOfwAtwA, nExogenousFactors, nFactors, nObs, wA, weights, wy, X, y
public LARSProblem(Vector y, Matrix X, boolean intercept, boolean normalized, boolean lasso)
y
- the vector of response variable (n * 1)X
- the matrix of covariates (n * m)intercept
- an indicator of whether an intercept is included in the
modelnormalized
- an indicator of whether the covariates are first
normalized to have unit L2 normlasso
- an indicator of whether LASSO variation is usedpublic LARSProblem(Vector y, Matrix X, boolean normalized, boolean lasso)
y
- the vector of response variable (n * 1)X
- the matrix of covariates (n * m)normalized
- an indicator of whether the covariates are first
normalized to have unit L2 normlasso
- an indicator of whether LASSO variation is usedpublic LARSProblem(Vector y, Matrix X, boolean lasso)
y
- the vector of response variable (n * 1)X
- the matrix of covariates (n * m)lasso
- an indicator of whether LASSO variation is usedpublic LARSProblem(Vector y, Matrix X)
y
- the vector of response variable (n * 1)X
- the matrix of covariates (n * m)public LARSProblem(LARSProblem that)
that
- another LeastAngelRegressionProblem
public int m()
public boolean isLASSO()
true
if the LASSO variation of LARS is usedpublic double yMean()
public Vector XMean()
public Vector XL2Norm()
public Vector yLARS()
public Matrix XLARS()
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.