|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.df.DecisionForest
public class DecisionForest
Represents a forest of decision trees.
Constructor Summary | |
---|---|
protected |
DecisionForest()
|
|
DecisionForest(java.util.List<Node> trees)
|
Method Summary | |
---|---|
void |
classify(Data data,
PredictionCallback callback)
Classifies the data and calls callback for each classification |
int |
classify(java.util.Random rng,
Instance instance)
predicts the label for the instance |
boolean |
equals(java.lang.Object obj)
|
java.util.List<Node> |
getTrees()
|
int |
hashCode()
|
static DecisionForest |
load(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path forestPath)
Load the forest from a single file or a directory of files |
long |
meanMaxDepth()
Mean maximum depth per tree |
long |
meanNbNodes()
Mean number of nodes per tree |
long |
nbNodes()
Total number of nodes in all the trees |
static DecisionForest |
read(java.io.DataInput dataInput)
|
void |
readFields(java.io.DataInput dataInput)
Reads the trees from the input and adds them to the existing trees |
void |
write(java.io.DataOutput dataOutput)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DecisionForest()
public DecisionForest(java.util.List<Node> trees)
Method Detail |
---|
public java.util.List<Node> getTrees()
public void classify(Data data, PredictionCallback callback)
public int classify(java.util.Random rng, Instance instance)
rng
- Random number generator, used to break ties randomlyinstance
-
public long meanNbNodes()
public long nbNodes()
public long meanMaxDepth()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public void write(java.io.DataOutput dataOutput) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void readFields(java.io.DataInput dataInput) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public static DecisionForest read(java.io.DataInput dataInput) throws java.io.IOException
java.io.IOException
public static DecisionForest load(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path forestPath) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |