hex.glm
Class GLMModel

java.lang.Object
  extended by water.Iced
      extended by water.Model
          extended by hex.glm.GLMModel
All Implemented Interfaces:
java.lang.Cloneable, Freezable

public class GLMModel
extends Model


Nested Class Summary
static class GLMModel.GLMValidationTask
           
 
Nested classes/interfaces inherited from class water.Model
Model.SB
 
Field Summary
static DocGen.FieldDoc[] DOC_FIELDS
           
 
Fields inherited from class water.Model
_dataKey, _domains, _names, _selfKey
 
Constructor Summary
GLMModel(Key selfKey, Frame fr, GLMParams glm, double beta_eps, double alpha, double lambda, long run_time, GLMParams.CaseMode caseMode, double caseVal)
           
GLMModel(Key selfKey, Key dataKey, int iteration, Frame fr, GLMTask glmt, double beta_eps, double alpha, double lambda, double[] beta, double threshold, java.lang.String[] warnings, long run_time, GLMParams.CaseMode caseMode, double caseVal)
           
 
Method Summary
 double[] beta()
           
 java.util.HashMap<java.lang.String,java.lang.Double> coefficients()
          get beta coefficients in a map indexed by name
 java.lang.String[] coefNames()
           
 void delete()
          Called when deleting this model, to cleanup any internal keys
 void generateHTML(java.lang.String title, java.lang.StringBuilder sb)
           
 int ncoefs()
           
 int rank()
           
protected  float[] score0(double[] data, float[] preds)
          Subclasses implement the scoring logic.
 void setValidation(GLMValidation val)
           
 java.lang.String toString()
           
 GLMValidation validation()
           
 
Methods inherited from class water.Model
adapt, classNames, cm, getDomainMapping, isClassifier, nclasses, responseName, score, score, score, score, score, score0, testJavaScoring, toJava, toJavaInit, toJavaInit, toJavaPredictBody
 
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, wait, wait, wait
 

Field Detail

DOC_FIELDS

public static DocGen.FieldDoc[] DOC_FIELDS
Constructor Detail

GLMModel

public GLMModel(Key selfKey,
                Frame fr,
                GLMParams glm,
                double beta_eps,
                double alpha,
                double lambda,
                long run_time,
                GLMParams.CaseMode caseMode,
                double caseVal)

GLMModel

public GLMModel(Key selfKey,
                Key dataKey,
                int iteration,
                Frame fr,
                GLMTask glmt,
                double beta_eps,
                double alpha,
                double lambda,
                double[] beta,
                double threshold,
                java.lang.String[] warnings,
                long run_time,
                GLMParams.CaseMode caseMode,
                double caseVal)
Method Detail

validation

public GLMValidation validation()

beta

public double[] beta()

score0

protected float[] score0(double[] data,
                         float[] preds)
Description copied from class: Model
Subclasses implement the scoring logic. The data is pre-loaded into a re-used temp array, in the order the model expects. The predictions are loaded into the re-used temp array, which is also returned.

Specified by:
score0 in class Model

ncoefs

public final int ncoefs()

generateHTML

public void generateHTML(java.lang.String title,
                         java.lang.StringBuilder sb)

coefficients

public java.util.HashMap<java.lang.String,java.lang.Double> coefficients()
get beta coefficients in a map indexed by name

Returns:

coefNames

public java.lang.String[] coefNames()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

rank

public int rank()

delete

public void delete()
Description copied from class: Model
Called when deleting this model, to cleanup any internal keys

Overrides:
delete in class Model

setValidation

public void setValidation(GLMValidation val)