com.rapidminer.operator.learner.meta
Class ContingencyMatrix
java.lang.Object
com.rapidminer.operator.learner.meta.ContingencyMatrix
- All Implemented Interfaces:
- java.io.Serializable
public class ContingencyMatrix
- extends java.lang.Object
- implements java.io.Serializable
This class computes the contingency matrix of classifiers, supports weighted
example sets and contains some convenience methods to query for some
evaluation metrics that can directly be computed from this matrix.
- Author:
- Martin Scholz
Exp $
- See Also:
- Serialized Form
Constructor Summary |
ContingencyMatrix(double[][] contigencyMatrix)
The contigency matrix in the format [true label][predicted label] |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ContingencyMatrix
public ContingencyMatrix(double[][] contigencyMatrix)
- The contigency matrix in the format [true label][predicted label]
- Parameters:
contigencyMatrix
-
getMatrix
public double[][] getMatrix()
getNumberOfClasses
public int getNumberOfClasses()
getNumberOfPredictions
public int getNumberOfPredictions()
getPriors
public double[] getPriors()
getPrior
public double getPrior(int trueLabel)
getCoverage
public double getCoverage(int predictedLabel)
getProbability
public double getProbability(int trueLabel,
int predictedLabel)
getPrecision
public double getPrecision(int trueLabel,
int predictedLabel)
getLift
public double getLift(int trueLabel,
int predictedLabel)
getLiftRatio
public double getLiftRatio(int trueLabel,
int predictedLabel)
getLiftRatiosForPrediction
public double[] getLiftRatiosForPrediction(int predictedLabel)
getAccuracy
public double getAccuracy()
getErrorRate
public double getErrorRate()
getTotalWeight
public double getTotalWeight()
clone
public ContingencyMatrix clone()
- Overrides:
clone
in class java.lang.Object
Copyright © 2001-2009 by Rapid-I