org.apache.mahout.classifier
Class ConfusionMatrixDumper

java.lang.Object
  extended by org.apache.hadoop.conf.Configured
      extended by org.apache.mahout.common.AbstractJob
          extended by org.apache.mahout.classifier.ConfusionMatrixDumper
All Implemented Interfaces:
org.apache.hadoop.conf.Configurable, org.apache.hadoop.util.Tool

public final class ConfusionMatrixDumper
extends AbstractJob

Export a ConfusionMatrix in various text formats: ToString version Grayscale HTML table Summary HTML table Table of counts all with optional HTML wrappers Input format: Hadoop SequenceFile with Text key and MatrixWritable value, 1 pair Intended to consume ConfusionMatrix SequenceFile output by Bayes TestClassifier class


Field Summary
 
Fields inherited from class org.apache.mahout.common.AbstractJob
argMap, inputFile, inputPath, outputFile, outputPath, tempPath
 
Method Summary
static void main(String[] args)
           
static void printCountsTable(ConfusionMatrix cm, PrintStream out)
           
static void printFooter(PrintStream out)
           
static void printGrayTable(ConfusionMatrix cm, PrintStream out)
           
static void printHeader(PrintStream out, CharSequence title)
           
static void printSummaryTable(ConfusionMatrix cm, PrintStream out)
           
 int run(String[] args)
           
 
Methods inherited from class org.apache.mahout.common.AbstractJob
addFlag, addInputOption, addOption, addOption, addOption, addOption, addOutputOption, buildOption, buildOption, getAnalyzerClassFromOption, getCLIOption, getConf, getDimensions, getFloat, getFloat, getGroup, getInputFile, getInputPath, getInt, getInt, getOption, getOption, getOption, getOptions, getOutputFile, getOutputPath, getOutputPath, getTempPath, getTempPath, hasOption, keyFor, maybePut, parseArguments, parseArguments, parseDirectories, prepareJob, prepareJob, prepareJob, prepareJob, setConf, setS3SafeCombinedInputPath, shouldRunNextPhase
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(String[] args)
                 throws Exception
Throws:
Exception

run

public int run(String[] args)
        throws IOException
Throws:
IOException

printSummaryTable

public static void printSummaryTable(ConfusionMatrix cm,
                                     PrintStream out)

printGrayTable

public static void printGrayTable(ConfusionMatrix cm,
                                  PrintStream out)

printCountsTable

public static void printCountsTable(ConfusionMatrix cm,
                                    PrintStream out)

printHeader

public static void printHeader(PrintStream out,
                               CharSequence title)

printFooter

public static void printFooter(PrintStream out)


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