public class RandomDecisionTree extends DecisionTree
DecisionTree.Node
Constructor and Description |
---|
RandomDecisionTree() |
RandomDecisionTree(int numFeatures)
Creates a new Random Decision Tree
|
RandomDecisionTree(int numFeatures,
int maxDepth,
int minSamples,
TreePruner.PruningMethod pruningMethod,
double testProportion)
Creates a new Random Decision Tree
|
RandomDecisionTree(RandomDecisionTree toCopy)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
RandomDecisionTree |
clone() |
int |
getRandomFeatureCount()
Returns the number of random features used at each node of the tree
|
protected DecisionTree.Node |
makeNodeC(List<DataPointPair<Integer>> dataPoints,
Set<Integer> options,
int depth,
ExecutorService threadPool,
ModifiableCountDownLatch mcdl)
Makes a new node for classification
|
protected DecisionTree.Node |
makeNodeR(List<DataPointPair<Double>> dataPoints,
Set<Integer> options,
int depth,
ExecutorService threadPool,
ModifiableCountDownLatch mcdl)
Makes a new node for regression
|
void |
setRandomFeatureCount(int numFeatures)
Sets the number of random features to and use at each node of
the decision tree
|
classify, getC45Tree, getGainMethod, getMaxDepth, getMinResultSplitSize, getMinSamples, getParameter, getParameters, getPruningMethod, getTestProportion, getTreeNodeVisitor, regress, setGainMethod, setMaxDepth, setMinResultSplitSize, setMinSamples, setPruningMethod, setTestProportion, supportsWeightedData, train, train, train, train, trainC, trainC, trainC, trainC
public RandomDecisionTree()
public RandomDecisionTree(int numFeatures)
numFeatures
- the number of random features to usepublic RandomDecisionTree(int numFeatures, int maxDepth, int minSamples, TreePruner.PruningMethod pruningMethod, double testProportion)
numFeatures
- the number of random features to usemaxDepth
- the maximum depth of the tree to createminSamples
- the minimum number of samples needed to continue branchingpruningMethod
- the method of pruning to use after constructiontestProportion
- the proportion of the data set to put aside to use for pruningpublic RandomDecisionTree(RandomDecisionTree toCopy)
toCopy
- the object to copypublic void setRandomFeatureCount(int numFeatures)
numFeatures
- the number of random featurespublic int getRandomFeatureCount()
protected DecisionTree.Node makeNodeC(List<DataPointPair<Integer>> dataPoints, Set<Integer> options, int depth, ExecutorService threadPool, ModifiableCountDownLatch mcdl)
DecisionTree
makeNodeC
in class DecisionTree
dataPoints
- the list of data points paired with their classoptions
- the attributes that this tree may select fromdepth
- the current depth of the treethreadPool
- the source of threadsmcdl
- count down latchprotected DecisionTree.Node makeNodeR(List<DataPointPair<Double>> dataPoints, Set<Integer> options, int depth, ExecutorService threadPool, ModifiableCountDownLatch mcdl)
DecisionTree
makeNodeR
in class DecisionTree
dataPoints
- the list of data points paired with their associated real valueoptions
- the attributes that this tree may select fromdepth
- the current depth of the treethreadPool
- the source of threadsmcdl
- count down latchpublic RandomDecisionTree clone()
clone
in interface Classifier
clone
in interface Regressor
clone
in class DecisionTree
Copyright © 2017. All rights reserved.