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

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

    public final class CDMahoutEvaluator

extends 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(List<? extends Rule> rules, int target, org.apache.hadoop.fs.Path inpath, org.apache.hadoop.fs.Path output, Collection<CDFitness> evaluations)` Use all the dataset for training.
`static void` `evaluate(List<? extends Rule> rules, int target, org.apache.hadoop.fs.Path inpath, org.apache.hadoop.fs.Path output, Collection<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, org.apache.hadoop.fs.Path output, 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(List<? extends Rule> rules,
                                int target,
                                org.apache.hadoop.fs.Path inpath,
                                org.apache.hadoop.fs.Path output,
                                Collection<CDFitness> evaluations,
                                DatasetSplit split)
                         throws IOException,
                                InterruptedException,
                                ClassNotFoundException

  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:
    `IOException`
    `InterruptedException`
    `ClassNotFoundException`

### initializeDataSet

    public static void initializeDataSet(org.apache.hadoop.fs.Path inpath)
                                  throws IOException

  Initializes the dataset

  Parameters:
    `inpath` - input path (the dataset)
  Throws:
    `IOException`

### evaluate

    public static CDFitness evaluate(Rule rule,
                                     int target,
                                     org.apache.hadoop.fs.Path inpath,
                                     org.apache.hadoop.fs.Path output,
                                     DatasetSplit split)
                              throws IOException,
                                     InterruptedException,
                                     ClassNotFoundException

  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:
    `IOException`
    `ClassNotFoundException`
    `InterruptedException`

### evaluate

    public static void evaluate(List<? extends Rule> rules,
                                int target,
                                org.apache.hadoop.fs.Path inpath,
                                org.apache.hadoop.fs.Path output,
                                Collection<CDFitness> evaluations)
                         throws IOException,
                                InterruptedException,
                                ClassNotFoundException

  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:
    `IOException`
    `InterruptedException`
    `ClassNotFoundException`

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