org.apache.mahout.classifier
Class ResultAnalyzer

java.lang.Object
  extended by 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)
           
 
Method Summary
 boolean addInstance(java.lang.String correctLabel, ClassifierResult classifiedResult)
           
 ConfusionMatrix getConfusionMatrix()
           
 java.lang.String summarize()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ResultAnalyzer

public ResultAnalyzer(java.util.Collection<java.lang.String> labelSet,
                      java.lang.String defaultLabel)
Method Detail

getConfusionMatrix

public ConfusionMatrix getConfusionMatrix()

addInstance

public boolean addInstance(java.lang.String correctLabel,
                           ClassifierResult classifiedResult)
Parameters:
correctLabel - The correct label
classifiedResult - 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.