hex
Class DGLM.GLMModel

java.lang.Object
  extended by water.Iced
      extended by water.OldModel
          extended by hex.DGLM.GLMModel
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Enclosing class:
DGLM

public static class DGLM.GLMModel
extends OldModel


Nested Class Summary
static class DGLM.GLMModel.Status
           
 
Field Summary
 double[] _beta
           
 boolean _converged
           
 long _dof
           
 DGLM.GLMParams _glmParams
           
 int _iterations
           
 long _lsmSolveTime
           
 long _nCols
           
 long _nLines
           
 double[] _normBeta
           
 DLSM.LSMSolver _solver
           
 boolean _standardized
           
 long _time
           
 DGLM.GLMValidation[] _vals
           
 java.lang.String[] _warnings
           
static java.lang.String KEY_PREFIX
           
static java.lang.String NAME
           
 
Fields inherited from class water.OldModel
_dataKey, _selfKey, _va, DOC_FIELDS
 
Constructor Summary
DGLM.GLMModel(DGLM.GLMModel.Status status, float progress, Key k, NewRowVecTask.DataFrame data, double[] beta, double[] normBeta, DGLM.GLMParams glmp, DLSM.LSMSolver solver, long nLines, long nCols, boolean converged, int iters, long time, java.lang.String[] warnings)
           
DGLM.GLMModel(DGLM.GLMModel.Status status, float progress, Key k, ValueArray ary, int[] colIds, int[] colCatMap, int response, boolean standardized, RowVecTask.Sampling s, double[] beta, double[] normBeta, DGLM.GLMParams glmp, DLSM.LSMSolver solver, long nLines, long nCols, boolean converged, int iters, long time, java.lang.String[] warnings)
           
 
Method Summary
 double[] beta()
           
 boolean converged()
           
 void delete()
          Called when deleting this model, to cleanup any internal keys
 java.lang.String error()
           
 boolean isSolved()
           
static Key makeKey(boolean visible)
           
 int rank()
           
 void remove()
           
protected  double score0(double[] data)
          Single row scoring, on properly ordered data.
protected  double score0(ValueArray data, AutoBuffer ab, int row_in_chunk)
          Bulk scoring API, on a compatible ValueArray (when pushed throw the mapping)
protected  double score0(ValueArray data, int row)
          Single row scoring, on a compatible ValueArray (when pushed throw the mapping)
 int[] selectedColumns()
          Ids of selected columns (the last idx is the response variable) of the original dataset, if it still exists in H2O, or null.
 DGLM.GLMModel.Status status()
           
 void store()
           
 com.google.gson.JsonObject toJson()
           
 DGLM.GLMValidation validateOn(Job job, ValueArray ary, RowVecTask.Sampling s, double[] thresholds)
           
 java.lang.String xcolNames()
          Expanded (categoricals expanded to vector of levels) ordered list of column names.
 DGLM.GLMValidation xvalidate(Job job, ValueArray ary, int folds, double[] thresholds, boolean parallel)
           
 
Methods inherited from class water.OldModel
adapt, adapt, columnFilter, columnMapping, fromJson, identityMap, isCompatible, isCompatible, isCompatible, response, responseName, score, score
 
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

_converged

public final boolean _converged

_standardized

public final boolean _standardized

_iterations

public final int _iterations

_time

public final long _time

_lsmSolveTime

public long _lsmSolveTime

_solver

public final DLSM.LSMSolver _solver

_glmParams

public final DGLM.GLMParams _glmParams

_dof

public final long _dof

_nCols

public final long _nCols

_nLines

public final long _nLines

_beta

public final double[] _beta

_normBeta

public final double[] _normBeta

_warnings

public java.lang.String[] _warnings

_vals

public DGLM.GLMValidation[] _vals

NAME

public static final java.lang.String NAME

KEY_PREFIX

public static final java.lang.String KEY_PREFIX
See Also:
Constant Field Values
Constructor Detail

DGLM.GLMModel

public DGLM.GLMModel(DGLM.GLMModel.Status status,
                     float progress,
                     Key k,
                     NewRowVecTask.DataFrame data,
                     double[] beta,
                     double[] normBeta,
                     DGLM.GLMParams glmp,
                     DLSM.LSMSolver solver,
                     long nLines,
                     long nCols,
                     boolean converged,
                     int iters,
                     long time,
                     java.lang.String[] warnings)

DGLM.GLMModel

public DGLM.GLMModel(DGLM.GLMModel.Status status,
                     float progress,
                     Key k,
                     ValueArray ary,
                     int[] colIds,
                     int[] colCatMap,
                     int response,
                     boolean standardized,
                     RowVecTask.Sampling s,
                     double[] beta,
                     double[] normBeta,
                     DGLM.GLMParams glmp,
                     DLSM.LSMSolver solver,
                     long nLines,
                     long nCols,
                     boolean converged,
                     int iters,
                     long time,
                     java.lang.String[] warnings)
Method Detail

status

public DGLM.GLMModel.Status status()

error

public java.lang.String error()

rank

public int rank()

isSolved

public boolean isSolved()

beta

public double[] beta()

makeKey

public static final Key makeKey(boolean visible)

selectedColumns

public int[] selectedColumns()
Ids of selected columns (the last idx is the response variable) of the original dataset, if it still exists in H2O, or null.

Returns:
array of column ids, the last is the response var.

xcolNames

public java.lang.String xcolNames()
Expanded (categoricals expanded to vector of levels) ordered list of column names.

Returns:

delete

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

Overrides:
delete in class OldModel

converged

public boolean converged()

store

public void store()

remove

public void remove()

validateOn

public DGLM.GLMValidation validateOn(Job job,
                                     ValueArray ary,
                                     RowVecTask.Sampling s,
                                     double[] thresholds)
                              throws NewRowVecTask.JobCancelledException
Throws:
NewRowVecTask.JobCancelledException

xvalidate

public DGLM.GLMValidation xvalidate(Job job,
                                    ValueArray ary,
                                    int folds,
                                    double[] thresholds,
                                    boolean parallel)
                             throws NewRowVecTask.JobCancelledException
Throws:
NewRowVecTask.JobCancelledException

toJson

public com.google.gson.JsonObject toJson()
Overrides:
toJson in class OldModel

score0

protected double score0(double[] data)
Single row scoring, on properly ordered data. Will return NaN if any data element contains a NaN.

Specified by:
score0 in class OldModel

score0

protected double score0(ValueArray data,
                        int row)
Single row scoring, on a compatible ValueArray (when pushed throw the mapping)

Overrides:
score0 in class OldModel

score0

protected double score0(ValueArray data,
                        AutoBuffer ab,
                        int row_in_chunk)
Bulk scoring API, on a compatible ValueArray (when pushed throw the mapping)

Overrides:
score0 in class OldModel