public class ConfusionMatrix<T extends Comparable<? super T>> extends Object implements Serializable
Constructor and Description |
---|
ConfusionMatrix() |
ConfusionMatrix(ConfusionMatrix<T> other)
Creates a new ConfusionMatrix initialized with the contents of another ConfusionMatrix.
|
ConfusionMatrix(List<T> classes)
Creates an empty confusion Matrix
|
Modifier and Type | Method and Description |
---|---|
void |
add(ConfusionMatrix<T> other)
Adds the entries from another confusion matrix to this one.
|
void |
add(T actual,
T predicted)
Increments the entry specified by actual and predicted by one.
|
void |
add(T actual,
T predicted,
int count)
Increments the entry specified by actual and predicted by count.
|
boolean |
equals(Object o) |
int |
getActualTotal(T actual)
Computes the total number of times the class actually appeared in the data.
|
List<T> |
getClasses()
Gives the applyTransformToDestination of all classes in the confusion matrix.
|
int |
getCount(T actual,
T predicted)
Gives the count of the number of times the "predicted" class was predicted for the "actual"
class.
|
int |
getPredictedTotal(T predicted)
Computes the total number of times the class was predicted by the classifier.
|
int |
hashCode() |
static void |
main(String[] args) |
String |
toCSV()
Outputs the ConfusionMatrix as comma-separated values for easy import into spreadsheets
|
String |
toHTML()
Outputs Confusion Matrix in an HTML table.
|
String |
toString() |
public ConfusionMatrix()
public ConfusionMatrix(ConfusionMatrix<T> other)
public void add(T actual, T predicted)
public void add(T actual, T predicted, int count)
public void add(ConfusionMatrix<T> other)
public List<T> getClasses()
public int getCount(T actual, T predicted)
public int getPredictedTotal(T predicted)
public int getActualTotal(T actual)
public String toCSV()
public String toHTML()
public static void main(String[] args)
Copyright © 2016. All Rights Reserved.