hex.glm
Class GLMTask<T extends GLMTask<T>>

java.lang.Object
  extended by jsr166y.ForkJoinTask<java.lang.Void>
      extended by jsr166y.CountedCompleter
          extended by water.H2O.H2OCountedCompleter
              extended by water.DTask
                  extended by water.MRTask2<T>
                      extended by hex.FrameTask<T>
                          extended by hex.glm.GLMTask<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.concurrent.Future<java.lang.Void>, Freezable
Direct Known Subclasses:
GLMTask.GLMIterationTask

public abstract class GLMTask<T extends GLMTask<T>>
extends FrameTask<T>

Base class for all GLM-related MRTask(2)s. Filters rows with NA(s), handles data-regularization of numeric columns on the fly, and performs on-the fly expansion of categoricals. Users should override processRow method and potentially reduce.

See Also:
Serialized Form

Nested Class Summary
static class GLMTask.GLMIterationTask
          One iteration of glm, computes weighted gram matrix and t(x)*y vector and t(y)*y scalar.
 
Field Summary
protected  double[] _beta
           
protected  GLMParams.CaseMode _caseMode
           
protected  double _caseVal
           
 
Fields inherited from class hex.FrameTask
_catOffsets, _cats, _nums, _standardize
 
Fields inherited from class water.MRTask2
_fr, _fs, _hi, _left, _lo, _nleft, _nodes, _nrite, _outputFrame, _rite, _topLocal
 
Fields inherited from class water.DTask
_cls, _eFromNode, _exception, _fname, _lineNum, _msg, _mth
 
Constructor Summary
protected GLMTask(GLMTask gt, double[] beta)
           
  GLMTask(Job job, GLMParams glm, double[] beta, boolean standardize, GLMParams.CaseMode cm, double cv)
           
  GLMTask(Job job, GLMParams glm, double[] beta, boolean standardize, GLMParams.CaseMode cm, double cv, int step, int offset, boolean complement)
           
 
Method Summary
protected  double computeEta(int ncats, int[] cats, double[] nums)
           
protected  int diagN()
           
 
Methods inherited from class hex.FrameTask
adaptFrame, catOffsets, cats, chunkDone, chunkInit, dfork2, doIt, fullN, largestCat, map, normMul, normSub, nums, processRow, processRow, standardize
 
Methods inherited from class water.MRTask2
clone, closeLocal, compute2, dfork, dfork, dfork, dfork, dinvoke, doAll, doAll, doAll, doAll, getResult, map, map, map, map, map, map, map, map, map, map, map, onCompletion, onExceptionalCompletion, postGlobal, profString, reduce, reduce4, setupLocal, vecs
 
Methods inherited from class water.DTask
copyOver, frozenType, getDException, hasException, logVerbose, newInstance, onAck, onAckAck, read, setException, toDocField, write, writeJSONFields
 
Methods inherited from class water.H2O.H2OCountedCompleter
compute, priority
 
Methods inherited from class jsr166y.CountedCompleter
addToPendingCount, compareAndSetPendingCount, complete, exec, getCompleter, getPendingCount, getRawResult, setCompleter, setPendingCount, setRawResult, tryComplete
 
Methods inherited from class jsr166y.ForkJoinTask
adapt, adapt, adapt, cancel, compareAndSetForkJoinTaskTag, completeExceptionally, fork, get, get, getException, getForkJoinTaskTag, getPool, getQueuedTaskCount, getSurplusQueuedTaskCount, helpQuiesce, inForkJoinPool, invoke, invokeAll, invokeAll, invokeAll, isCancelled, isCompletedAbnormally, isCompletedNormally, isDone, join, peekNextLocalTask, pollNextLocalTask, pollTask, quietlyComplete, quietlyInvoke, quietlyJoin, reinitialize, setForkJoinTaskTag, tryUnfork
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_beta

protected final double[] _beta

_caseMode

protected final GLMParams.CaseMode _caseMode

_caseVal

protected final double _caseVal
Constructor Detail

GLMTask

public GLMTask(Job job,
               GLMParams glm,
               double[] beta,
               boolean standardize,
               GLMParams.CaseMode cm,
               double cv)

GLMTask

public GLMTask(Job job,
               GLMParams glm,
               double[] beta,
               boolean standardize,
               GLMParams.CaseMode cm,
               double cv,
               int step,
               int offset,
               boolean complement)

GLMTask

protected GLMTask(GLMTask gt,
                  double[] beta)
Method Detail

diagN

protected final int diagN()

computeEta

protected final double computeEta(int ncats,
                                  int[] cats,
                                  double[] nums)