org.apache.mahout.classifier.df.mapreduce.partial
Class PartialBuilder
java.lang.Object
org.apache.mahout.classifier.df.mapreduce.Builder
org.apache.mahout.classifier.df.mapreduce.partial.PartialBuilder
public class PartialBuilder
- extends Builder
Builds a random forest using partial data. Each mapper uses only the data given by its InputSplit
Constructor Summary |
PartialBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath,
Long seed)
|
PartialBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath,
Long seed,
org.apache.hadoop.conf.Configuration conf)
|
Method Summary |
protected void |
configureJob(org.apache.hadoop.mapreduce.Job job)
Used by the inheriting classes to configure the job |
protected DecisionForest |
parseOutput(org.apache.hadoop.mapreduce.Job job)
Parse the output files to extract the trees and pass the predictions to the callback |
protected static void |
processOutput(org.apache.hadoop.mapreduce.JobContext job,
org.apache.hadoop.fs.Path outputPath,
TreeID[] keys,
Node[] trees)
Processes the output from the output path.
|
Methods inherited from class org.apache.mahout.classifier.df.mapreduce.Builder |
build, getDataPath, getDistributedCacheFile, getNbTrees, getNumMaps, getOutputPath, getRandomSeed, getTreeBuilder, isOutput, loadDataset, runJob, setNbTrees, setOutputDirName, sortSplits |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PartialBuilder
public PartialBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath,
Long seed)
PartialBuilder
public PartialBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath,
Long seed,
org.apache.hadoop.conf.Configuration conf)
configureJob
protected void configureJob(org.apache.hadoop.mapreduce.Job job)
throws IOException
- Description copied from class:
Builder
- Used by the inheriting classes to configure the job
- Specified by:
configureJob
in class Builder
- Parameters:
job
- Hadoop's Job
- Throws:
IOException
- if anything goes wrong while configuring the job
parseOutput
protected DecisionForest parseOutput(org.apache.hadoop.mapreduce.Job job)
throws IOException
- Description copied from class:
Builder
- Parse the output files to extract the trees and pass the predictions to the callback
- Specified by:
parseOutput
in class Builder
- Parameters:
job
- Hadoop's job
- Returns:
- Built DecisionForest
- Throws:
IOException
- if anything goes wrong while parsing the output
processOutput
protected static void processOutput(org.apache.hadoop.mapreduce.JobContext job,
org.apache.hadoop.fs.Path outputPath,
TreeID[] keys,
Node[] trees)
throws IOException
- Processes the output from the output path.
- Parameters:
outputPath
- directory that contains the output of the jobkeys
- can be nulltrees
- can be null
- Throws:
IOException
Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.