org.apache.mahout.ga.watchmaker.cd.hadoop
Class CDMahoutEvaluator

java.lang.Object
  extended by org.apache.mahout.ga.watchmaker.cd.hadoop.CDMahoutEvaluator

public class CDMahoutEvaluator
extends java.lang.Object

Mahout distributed evaluator. takes a list of classification rules and an input path and launch a Hadoop job to evaluate the fitness of each rule. At the end loads the evaluations from the job output.


Method Summary
static void evaluate(java.util.List<? extends Rule> rules, int target, org.apache.hadoop.fs.Path inpath, java.util.List<CDFitness> evaluations)
          Use all the dataset for training.
static void evaluate(java.util.List<? extends Rule> rules, int target, org.apache.hadoop.fs.Path inpath, java.util.List<CDFitness> evaluations, DatasetSplit split)
          Uses Mahout to evaluate the classification rules using the given evaluator.
static CDFitness evaluate(Rule rule, int target, org.apache.hadoop.fs.Path inpath, DatasetSplit split)
          Evaluate a single rule.
static void initializeDataSet(org.apache.hadoop.fs.Path inpath)
          Initializes the dataset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

evaluate

public static void evaluate(java.util.List<? extends Rule> rules,
                            int target,
                            org.apache.hadoop.fs.Path inpath,
                            java.util.List<CDFitness> evaluations,
                            DatasetSplit split)
                     throws java.io.IOException
Uses Mahout to evaluate the classification rules using the given evaluator. The input path contains the dataset

Parameters:
rules - classification rules to evaluate
target - label value to evaluate the rules for
inpath - input path (the dataset)
evaluations - List<CDFitness> that contains the evaluated fitness for each candidate from the input population, sorted in the same order as the candidates.
split - DatasetSplit used to separate training and testing input
Throws:
java.io.IOException

initializeDataSet

public static void initializeDataSet(org.apache.hadoop.fs.Path inpath)
                              throws java.io.IOException
Initializes the dataset

Parameters:
inpath - input path (the dataset)
Throws:
java.io.IOException

evaluate

public static CDFitness evaluate(Rule rule,
                                 int target,
                                 org.apache.hadoop.fs.Path inpath,
                                 DatasetSplit split)
                          throws java.io.IOException
Evaluate a single rule.

Parameters:
rule - classification rule to evaluate
target - label value to evaluate the rules for
inpath - input path (the dataset)
split - DatasetSplit used to separate training and testing input
Returns:
the evaluation
Throws:
java.io.IOException

evaluate

public static void evaluate(java.util.List<? extends Rule> rules,
                            int target,
                            org.apache.hadoop.fs.Path inpath,
                            java.util.List<CDFitness> evaluations)
                     throws java.io.IOException
Use all the dataset for training.

Parameters:
rules - classification rules to evaluate
target - label value to evaluate the rules for
inpath - input path (the dataset)
evaluations - List<CDFitness> that contains the evaluated fitness for each candidate from the input population, sorted in the same order as the candidates.
Throws:
java.io.IOException


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