|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.classifier.df.DecisionForest
public class DecisionForest
Represents a forest of decision trees.
Constructor Summary | |
---|---|
DecisionForest(List<Node> trees)
|
Method Summary | |
---|---|
void |
classify(Data data,
double[][] predictions)
Classifies the data and calls callback for each classification |
double |
classify(Dataset dataset,
Random rng,
Instance instance)
predicts the label for the instance |
boolean |
equals(Object obj)
|
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()
|
long |
meanNbNodes()
|
long |
nbNodes()
|
void |
readFields(DataInput dataInput)
Reads the trees from the input and adds them to the existing trees |
void |
write(DataOutput dataOutput)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DecisionForest(List<Node> trees)
Method Detail |
---|
public void classify(Data data, double[][] predictions)
public double classify(Dataset dataset, Random rng, Instance instance)
rng
- Random number generator, used to break ties randomly
public long meanNbNodes()
public long nbNodes()
public long meanMaxDepth()
public boolean equals(Object obj)
equals
in class Object
public int hashCode()
hashCode
in class Object
public void write(DataOutput dataOutput) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public void readFields(DataInput dataInput) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public static DecisionForest load(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path forestPath) throws IOException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |