hex.rf
Class ConfusionTask.CMFinal

java.lang.Object
  extended by water.Iced
      extended by hex.rf.ConfusionTask.CMFinal
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Enclosing class:
ConfusionTask

public static class ConfusionTask.CMFinal
extends Iced


Field Summary
protected  boolean _computedOOB
           
protected  java.lang.String[] _domain
           
protected  long _errors
          Number of mistaken assignments.
protected  long[] _errorsPerTree
           
protected  long[][] _matrix
          The Confusion Matrix - a NxN matrix of [actual] -vs- [predicted] classes, referenced as _matrix[actual][predicted].
protected  Key _rfModelKey
           
protected  long _rows
          Number of rows used for building the matrix.
protected  long _skippedRows
          Number of skipped rows.
protected  boolean _valid
           
 
Method Summary
 hex.rf.ConfusionTask.CM add(hex.rf.ConfusionTask.CM cm)
          Add a confusion matrix.
 float classError()
          Domain - names of columns and rows
 int dimension()
           
 java.lang.String[] domain()
           
static ConfusionTask.CMFinal make()
          Make non-valid confusion matrix
static ConfusionTask.CMFinal make(hex.rf.ConfusionTask.CM cm, RFModel model, java.lang.String[] domain, long[] errorsPerTree, boolean computedOOB)
          Create a new confusion matrix.
 long matrix(int i, int j)
           
 void report()
          Output information about this RF.
 void report(java.lang.StringBuilder sb)
          Reports size of dataset and computed classification error.
 long rows()
          Return number of rows used for CM computation
 long skippedRows()
          Return number of skipped rows during CM computation The number includes in-bag rows if oobee is used.
 java.lang.String toString()
          Text form of the confusion matrix
static void updateDKV(Key key, ConfusionTask.CMFinal cm)
           
 boolean valid()
           
 
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

_rfModelKey

protected final Key _rfModelKey

_domain

protected final java.lang.String[] _domain

_errorsPerTree

protected final long[] _errorsPerTree

_computedOOB

protected final boolean _computedOOB

_valid

protected boolean _valid

_matrix

protected long[][] _matrix
The Confusion Matrix - a NxN matrix of [actual] -vs- [predicted] classes, referenced as _matrix[actual][predicted]. Each row in the dataset is voted on by all trees, and the majority vote is the predicted class for the row. Each row thus gets 1 entry in the matrix.


_errors

protected long _errors
Number of mistaken assignments.


_rows

protected long _rows
Number of rows used for building the matrix.


_skippedRows

protected long _skippedRows
Number of skipped rows. Rows can contain bad data, or can be skipped by selecting only out-of-back rows

Method Detail

make

public static final ConfusionTask.CMFinal make()
Make non-valid confusion matrix


make

public static final ConfusionTask.CMFinal make(hex.rf.ConfusionTask.CM cm,
                                               RFModel model,
                                               java.lang.String[] domain,
                                               long[] errorsPerTree,
                                               boolean computedOOB)
Create a new confusion matrix.


domain

public java.lang.String[] domain()

dimension

public int dimension()

matrix

public long matrix(int i,
                   int j)

valid

public boolean valid()

report

public final void report()
Output information about this RF.


report

public final void report(java.lang.StringBuilder sb)
Reports size of dataset and computed classification error.


updateDKV

public static void updateDKV(Key key,
                             ConfusionTask.CMFinal cm)

classError

public float classError()
Domain - names of columns and rows


rows

public long rows()
Return number of rows used for CM computation


skippedRows

public long skippedRows()
Return number of skipped rows during CM computation The number includes in-bag rows if oobee is used.


add

public hex.rf.ConfusionTask.CM add(hex.rf.ConfusionTask.CM cm)
Add a confusion matrix.


toString

public java.lang.String toString()
Text form of the confusion matrix

Overrides:
toString in class java.lang.Object