public abstract class LSMSolver extends Iced
| Modifier and Type | Class and Description |
|---|---|
static class |
LSMSolver.ADMMSolver |
static class |
LSMSolver.LSMSolverException |
static class |
LSMSolver.LSMSolverType |
static class |
LSMSolver.ProxSolver |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
_converged |
java.lang.String |
_id |
Key |
_jobKey |
| Constructor and Description |
|---|
LSMSolver(double lambda,
double alpha) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
converged() |
boolean |
converged(Gram gram,
double[] beta,
double[] xy) |
boolean |
converged(Gram gram,
double[] beta,
double[] xy,
double eps) |
protected double |
lsm_objectiveVal(double[] xy,
double yy,
double[] beta,
double[] xb)
Compute the LSM objective.
|
abstract java.lang.String |
name() |
protected double |
objectiveVal(double[] xy,
double yy,
double[] beta,
double[] xb)
Compute least squares objective function value:
lsm_obj(beta) = 0.5*(y - X*b)'*(y - X*b) + l1 + l2
= 0.5*y'y - (X'y)'*b + 0.5*b'*X'X*b) + l1 + l2
l1 = alpha*lambda*l1norm(beta)
l2 = (1-alpha)*lambda*l2norm(beta)/2
|
protected static double |
shrinkage(double x,
double kappa) |
abstract boolean |
solve(Gram gram,
double[] xy,
double yy,
double[] newBeta) |
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFieldspublic Key _jobKey
public java.lang.String _id
protected boolean _converged
public final boolean converged(Gram gram, double[] beta, double[] xy)
public final boolean converged(Gram gram, double[] beta, double[] xy, double eps)
public abstract boolean solve(Gram gram, double[] xy, double yy, double[] newBeta)
xy - - guassian: -X'y binomial: -(1/4)X'(XB + (y-p)/(p*1-p))yy - - newBeta - - resulting vector of coefficientspublic final boolean converged()
public abstract java.lang.String name()
protected static double shrinkage(double x,
double kappa)
protected double objectiveVal(double[] xy,
double yy,
double[] beta,
double[] xb)
xy: - X'yyy: - 0.5*y'ybeta: - b (vector of coefficients)xb: - X'X*betaprotected double lsm_objectiveVal(double[] xy,
double yy,
double[] beta,
double[] xb)
xy - X'yyy - y'ybeta - xb - X'X*beta