org.apache.mahout.df.tools
Class FrequenciesJob

java.lang.Object
  extended by org.apache.mahout.df.tools.FrequenciesJob

public class FrequenciesJob
extends java.lang.Object

Temporary class used to compute the frequency distribution of the "class attribute".


Constructor Summary
FrequenciesJob(org.apache.hadoop.fs.Path base, org.apache.hadoop.fs.Path dataPath, org.apache.hadoop.fs.Path datasetPath)
           
 
Method Summary
protected  int[][] parseOutput(org.apache.hadoop.mapreduce.JobContext job)
          Extracts the output and processes it
 int[][] run(org.apache.hadoop.conf.Configuration conf)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FrequenciesJob

public FrequenciesJob(org.apache.hadoop.fs.Path base,
                      org.apache.hadoop.fs.Path dataPath,
                      org.apache.hadoop.fs.Path datasetPath)
Parameters:
base - base directory
dataPath - data used in the first step
Method Detail

run

public int[][] run(org.apache.hadoop.conf.Configuration conf)
            throws java.io.IOException,
                   java.lang.ClassNotFoundException,
                   java.lang.InterruptedException
Returns:
counts[partition][label] = num tuples from 'partition' with class == label
Throws:
java.io.IOException
java.lang.ClassNotFoundException
java.lang.InterruptedException

parseOutput

protected int[][] parseOutput(org.apache.hadoop.mapreduce.JobContext job)
                       throws java.io.IOException
Extracts the output and processes it

Returns:
counts[partition][label] = num tuples from 'partition' with class == label
Throws:
java.io.IOException


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.