hex
Class ConfusionMatrix

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

public final class ConfusionMatrix
extends Iced


Nested Class Summary
static class ConfusionMatrix.ErrMetric
           
 
Field Summary
 long[][] _arr
           
static DocGen.FieldDoc[] DOC_FIELDS
           
 
Constructor Summary
ConfusionMatrix(int n)
           
ConfusionMatrix(long[][] value)
           
 
Method Summary
 void add(ConfusionMatrix other)
           
 void add(int i, int j)
           
 double[] classErr()
           
 double classErr(int c)
           
 ConfusionMatrix clone()
           
 double err()
           
 double precisionAndRecall()
           
static double precisionAndRecall(long[][] cm)
          Returns the F-measure which combines precision and recall.
 int size()
           
 com.google.gson.JsonArray toJson()
           
 java.lang.String toString()
           
 
Methods inherited from class water.Iced
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

_arr

public long[][] _arr
Constructor Detail

ConfusionMatrix

public ConfusionMatrix(int n)

ConfusionMatrix

public ConfusionMatrix(long[][] value)
Method Detail

clone

public ConfusionMatrix clone()
Overrides:
clone in class Iced

add

public void add(int i,
                int j)

classErr

public final double[] classErr()

size

public final int size()

classErr

public final double classErr(int c)

err

public double err()

add

public void add(ConfusionMatrix other)

precisionAndRecall

public double precisionAndRecall()

precisionAndRecall

public static double precisionAndRecall(long[][] cm)
Returns the F-measure which combines precision and recall.
C.f. end of http://en.wikipedia.org/wiki/Precision_and_recall.


toString

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

toJson

public com.google.gson.JsonArray toJson()