public class ConfusionMatrix extends cern.colt.matrix.tint.impl.DenseIntMatrix2D implements Serializable
Constructor and Description |
---|
ConfusionMatrix(ConfusionMatrix cm)
Copy constructor.
|
ConfusionMatrix(int numClasses)
Initializes an empty confusion matrix of size numClasses.
|
ConfusionMatrix(int[][] data)
Initializes a confusion matrix from a 2D array of ints.
|
Modifier and Type | Method and Description |
---|---|
void |
accumulate(Collection<ConfusionMatrix> cms)
Accumulates the scores from a collection of confusion matrices.
|
void |
accumulate(ConfusionMatrix cm)
Accumulates the scores from another confusion matrix.
|
static ConfusionMatrix |
aggregate(Collection<ConfusionMatrix> cms)
Aggregates the scores of a collection of confusion matrices.
|
ConfusionMatrix |
clone()
Returns a deep copy of the confusion matrix.
|
int |
getNumClasses()
Returns the number of classes (labels).
|
SquareMatrix |
getPrecisionMatrix()
Returns the precision matrix, computed by normlizing each entry (i,j) the sum of column j.
|
SquareMatrix |
getRecallMatrix()
Returns the recall matrix, computed by normlizing each entry (i,j) the sum of row i.
|
String |
toMatlabString()
Returns a Matlab string representation of the confusion matrix.
|
aggregate, aggregate, aggregate, aggregate, assign, assign, assign, assign, assign, assign, assign, assign, assign, cardinality, elements, forEachNonZero, getMaxLocation, getMinLocation, getNegativeValues, getNonZeros, getPositiveValues, getQuick, haveSharedCellsRaw, index, like, like1D, like1D, setQuick, toArray, vectorize, viewSelectionLike, zMult, zMult, zSum
copy, equals, equals, get, getContent, haveSharedCells, like, set, toString, view, viewColumn, viewColumnFlip, viewDice, viewPart, viewRow, viewRowFlip, viewSelection, viewSelection, viewSelection, viewSorted, viewStrides, zMult, zMult
_columnOffset, _columnRank, _rowOffset, _rowRank, checkBox, checkColumn, checkColumnIndexes, checkRow, checkRowIndexes, checkShape, checkShape, columns, columnStride, rows, rowStride, setUp, setUp, size, toStringShort, vColumnFlip, vDice, vPart, vRowFlip, vStrides
public ConfusionMatrix(int numClasses)
public ConfusionMatrix(int[][] data)
public ConfusionMatrix(ConfusionMatrix cm)
public int getNumClasses()
public void accumulate(ConfusionMatrix cm)
public void accumulate(Collection<ConfusionMatrix> cms)
public static ConfusionMatrix aggregate(Collection<ConfusionMatrix> cms)
public SquareMatrix getPrecisionMatrix()
public SquareMatrix getRecallMatrix()
public String toMatlabString()
public ConfusionMatrix clone()
clone
in class cern.colt.PersistentObject
Copyright © 2018 University of California, Santa Cruz. All rights reserved.