hex.glm
Class LSMSolver.GeneralizedGradientSolver

java.lang.Object
  extended by water.Iced
      extended by hex.glm.LSMSolver
          extended by hex.glm.LSMSolver.GeneralizedGradientSolver
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Enclosing class:
LSMSolver

public static final class LSMSolver.GeneralizedGradientSolver
extends LSMSolver

Generalized gradient solver for solving LSM problem with combination of L1 and L2 penalty.


Nested Class Summary
 
Nested classes/interfaces inherited from class hex.glm.LSMSolver
LSMSolver.ADMMSolver, LSMSolver.GeneralizedGradientSolver, LSMSolver.LSMSolverException, LSMSolver.LSMSolverType
 
Field Summary
 double _betaEps
           
 double _kappa
           
static double EPS
           
static int MAX_ITER
           
 
Fields inherited from class hex.glm.LSMSolver
_alpha, _converged, _lambda
 
Constructor Summary
LSMSolver.GeneralizedGradientSolver(double lambda, double alpha)
           
LSMSolver.GeneralizedGradientSolver(double lambda, double alpha, double betaEps)
           
 
Method Summary
 java.lang.String name()
           
 boolean solve(Gram gram, double[] xy, double yy, double[] newBeta)
           
 com.google.gson.JsonObject toJson()
           
 
Methods inherited from class hex.glm.LSMSolver
converged
 
Methods inherited from class water.Iced
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_kappa

public final double _kappa

_betaEps

public final double _betaEps

MAX_ITER

public static final int MAX_ITER
See Also:
Constant Field Values

EPS

public static final double EPS
See Also:
Constant Field Values
Constructor Detail

LSMSolver.GeneralizedGradientSolver

public LSMSolver.GeneralizedGradientSolver(double lambda,
                                           double alpha)

LSMSolver.GeneralizedGradientSolver

public LSMSolver.GeneralizedGradientSolver(double lambda,
                                           double alpha,
                                           double betaEps)
Method Detail

solve

public boolean solve(Gram gram,
                     double[] xy,
                     double yy,
                     double[] newBeta)
Specified by:
solve in class LSMSolver
Parameters:
xx: - gram matrix. gaussian: X'X, binomial:(1/4)X'X
xy: - -X'y (LSM) l or -(1/4)X'(XB + (y-p)/(p*1-p))(IRLSM
yy: - 0.5*y'*y gaussian, 0.25*z'*z IRLSM
beta: - previous vector of coefficients, will be modified/destroyed
newBeta: - resulting vector of coefficients
Returns:
true if converged

toJson

public com.google.gson.JsonObject toJson()
Specified by:
toJson in class LSMSolver

name

public java.lang.String name()
Specified by:
name in class LSMSolver