|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.mahout.df.builder.DefaultTreeBuilder
public class DefaultTreeBuilder
Builds a Decision Tree
Based on the algorithm described in the "Decision Trees" tutorials by Andrew W. Moore, available at:
http://www.cs.cmu.edu/~awm/tutorials
Constructor Summary | |
---|---|
DefaultTreeBuilder()
|
Method Summary | |
---|---|
Node |
build(Random rng,
Data data)
Builds a Decision tree using the training data |
protected static boolean[] |
cloneCategoricalAttributes(Dataset dataset,
boolean[] selected)
Make a copy of the selection state of the attributes, unselect all numerical attributes |
protected static int[] |
randomAttributes(Random rng,
boolean[] selected,
int m)
Randomly selects m attributes to consider for split, excludes IGNORED and LABEL attributes |
void |
setIgSplit(IgSplit igSplit)
|
void |
setM(int m)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultTreeBuilder()
Method Detail |
---|
public void setM(int m)
public void setIgSplit(IgSplit igSplit)
public Node build(Random rng, Data data)
TreeBuilder
build
in interface TreeBuilder
rng
- random-numbers generatordata
- training data
protected static boolean[] cloneCategoricalAttributes(Dataset dataset, boolean[] selected)
dataset
- selected
- selection state to clone
protected static int[] randomAttributes(Random rng, boolean[] selected, int m)
rng
- random-numbers generatorselected
- attributes' state (selected or not)m
- number of attributes to choose
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |