org.apache.mahout.df.mapred.inmem
Class InMemBuilder
java.lang.Object
org.apache.mahout.df.mapred.Builder
org.apache.mahout.df.mapred.inmem.InMemBuilder
public class InMemBuilder
- extends Builder
MapReduce implementation where each mapper loads a full copy of the data
in-memory. The forest trees are splitted across all the mappers
Constructor Summary |
InMemBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath)
|
InMemBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath,
java.lang.Long seed,
org.apache.hadoop.conf.Configuration conf)
|
Method Summary |
protected void |
configureJob(org.apache.hadoop.mapred.JobConf conf,
int nbTrees,
boolean oobEstimate)
Used by the inheriting classes to configure the job |
protected DecisionForest |
parseOutput(org.apache.hadoop.mapred.JobConf conf,
PredictionCallback callback)
Parse the output files to extract the trees and pass the predictions to the callback |
Methods inherited from class org.apache.mahout.df.mapred.Builder |
build, getConf, getDataPath, getDatasetPath, getDistributedCacheFile, getNbTrees, getOutputPath, getRandomSeed, getSeed, getTreeBuilder, getTreeBuilder, isOobEstimate, isOutput, loadDataset, runJob, setNbTrees, setOutputDirName, sortSplits |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InMemBuilder
public InMemBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath,
java.lang.Long seed,
org.apache.hadoop.conf.Configuration conf)
InMemBuilder
public InMemBuilder(TreeBuilder treeBuilder,
org.apache.hadoop.fs.Path dataPath,
org.apache.hadoop.fs.Path datasetPath)
configureJob
protected void configureJob(org.apache.hadoop.mapred.JobConf conf,
int nbTrees,
boolean oobEstimate)
throws java.io.IOException
- Description copied from class:
Builder
- Used by the inheriting classes to configure the job
- Specified by:
configureJob
in class Builder
nbTrees
- number of trees to growoobEstimate
- true, if oob error should be estimated
- Throws:
java.io.IOException
parseOutput
protected DecisionForest parseOutput(org.apache.hadoop.mapred.JobConf conf,
PredictionCallback callback)
throws java.io.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
callback
- can be null
- Returns:
-
- Throws:
java.io.IOException
Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.