hex.glm
Class LSMSolver

java.lang.Object
  extended by water.Iced
      extended by hex.glm.LSMSolver
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Direct Known Subclasses:
LSMSolver.ADMMSolver, LSMSolver.GeneralizedGradientSolver

public abstract class LSMSolver
extends Iced

Distributed least squares solvers


Nested Class Summary
static class LSMSolver.ADMMSolver
           
static class LSMSolver.GeneralizedGradientSolver
          Generalized gradient solver for solving LSM problem with combination of L1 and L2 penalty.
static class LSMSolver.LSMSolverException
           
static class LSMSolver.LSMSolverType
           
 
Field Summary
 double _alpha
           
protected  boolean _converged
           
 double _lambda
           
 
Constructor Summary
LSMSolver(double lambda, double alpha)
           
 
Method Summary
 boolean converged()
           
abstract  java.lang.String name()
           
abstract  boolean solve(Gram gram, double[] xy, double yy, double[] newBeta)
           
abstract  com.google.gson.JsonObject toJson()
           
 
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

_lambda

public double _lambda

_alpha

public final double _alpha

_converged

protected boolean _converged
Constructor Detail

LSMSolver

public LSMSolver(double lambda,
                 double alpha)
Method Detail

solve

public abstract boolean solve(Gram gram,
                              double[] xy,
                              double yy,
                              double[] newBeta)
Parameters:
xx - - gram matrix. gaussian: X'X, binomial:(1/4)X'X
xy - - guassian: -X'y binomial: -(1/4)X'(XB + (y-p)/(p*1-p))
yy - - /2
beta - - previous vector of coefficients, will be modified/destroyed
newBeta - - resulting vector of coefficients
Returns:
true if converged

toJson

public abstract com.google.gson.JsonObject toJson()

converged

public final boolean converged()

name

public abstract java.lang.String name()