## org.apache.mahout.classifier
Class ResultAnalyzer

    java.lang.Object
      org.apache.mahout.classifier.ResultAnalyzer

    public class ResultAnalyzer

extends Object

ResultAnalyzer captures the classification statistics and displays in a tabular manner

Constructor Summary
`ResultAnalyzer(Collection<String> labelSet, String defaultLabel)`

Method Summary
`boolean` `addInstance(String correctLabel, ClassifierResult classifiedResult)`
`ConfusionMatrix` `getConfusionMatrix()`
`String` `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ResultAnalyzer

    public ResultAnalyzer(Collection<String> labelSet,
                          String defaultLabel)

Method Detail

### getConfusionMatrix

    public ConfusionMatrix getConfusionMatrix()

### addInstance

    public boolean addInstance(String correctLabel,
                               ClassifierResult classifiedResult)

  Parameters:
    `correctLabel` - The correct label
    `classifiedResult` - The classified result
  Returns:
    whether the instance was correct or not

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.