org.apache.mahout.classifier
Class ResultAnalyzer
java.lang.Object
org.apache.mahout.classifier.ResultAnalyzer
- All Implemented Interfaces:
- Summarizable
public class ResultAnalyzer
- extends java.lang.Object
- implements Summarizable
ResultAnalyzer captures the classification statistics and displays in a tabular manner
Constructor Summary |
ResultAnalyzer(java.util.Collection<java.lang.String> labelSet,
java.lang.String defaultLabel)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ResultAnalyzer
public ResultAnalyzer(java.util.Collection<java.lang.String> labelSet,
java.lang.String defaultLabel)
getConfusionMatrix
public ConfusionMatrix getConfusionMatrix()
addInstance
public boolean addInstance(java.lang.String correctLabel,
ClassifierResult classifiedResult)
- Parameters:
correctLabel
- The correct labelclassifiedResult
- The classified result
- Returns:
- whether the instance was correct or not
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
summarize
public java.lang.String summarize()
- Specified by:
summarize
in interface Summarizable
- Returns:
- Summary of the data inside the class
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.