public class DefaultTreeBuilder extends Object implements TreeBuilder
Constructor and Description |
---|
DefaultTreeBuilder() |
Modifier and Type | Method and Description |
---|---|
Node |
build(Random rng,
Data data)
Builds a Decision tree using the training data
|
protected static int[] |
randomAttributes(Random rng,
boolean[] selected,
int m)
Randomly selects m attributes to consider for split, excludes IGNORED and LABEL attributes
|
void |
setM(int m) |
public void setM(int m)
public Node build(Random rng, Data data)
TreeBuilder
build
in interface TreeBuilder
rng
- random-numbers generatordata
- training dataprotected static int[] randomAttributes(Random rng, boolean[] selected, int m)
rng
- random-numbers generatorselected
- attributes' state (selected or not)m
- number of attributes to chooseCopyright © 2008–2015 The Apache Software Foundation. All rights reserved.