jsat.classifiers.trees
Class RandomDecisionTree
- java.lang.Object
-
- jsat.classifiers.trees.DecisionTree
-
- jsat.classifiers.trees.RandomDecisionTree
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Classifier, TreeLearner, Parameterized, Regressor
public class RandomDecisionTree extends DecisionTree
An extension of Decision Trees, it ignores the given set of features to use- and selects a new random subset of features at each node for use.
The Random Decision Tree supports missing values in training and prediction.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description RandomDecisionTree()RandomDecisionTree(int numFeatures)Creates a new Random Decision TreeRandomDecisionTree(int numFeatures, int maxDepth, int minSamples, TreePruner.PruningMethod pruningMethod, double testProportion)Creates a new Random Decision TreeRandomDecisionTree(RandomDecisionTree toCopy)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description RandomDecisionTreeclone()intgetRandomFeatureCount()Returns the number of random features used at each node of the treevoidsetRandomFeatureCount(int numFeatures)Sets the number of random features to and use at each node of the decision tree-
Methods inherited from class jsat.classifiers.trees.DecisionTree
classify, getC45Tree, getGainMethod, getMaxDepth, getMinResultSplitSize, getMinSamples, getParameters, getPruningMethod, getTestProportion, getTreeNodeVisitor, regress, setGainMethod, setMaxDepth, setMinResultSplitSize, setMinSamples, setPruningMethod, setTestProportion, supportsWeightedData, train, train, train, train, trainC
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jsat.classifiers.Classifier
train
-
Methods inherited from interface jsat.parameters.Parameterized
getParameter
-
-
-
-
Constructor Detail
-
RandomDecisionTree
public RandomDecisionTree()
-
RandomDecisionTree
public RandomDecisionTree(int numFeatures)
Creates a new Random Decision Tree- Parameters:
numFeatures- the number of random features to use
-
RandomDecisionTree
public RandomDecisionTree(int numFeatures, int maxDepth, int minSamples, TreePruner.PruningMethod pruningMethod, double testProportion)Creates a new Random Decision Tree- Parameters:
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 pruning
-
RandomDecisionTree
public RandomDecisionTree(RandomDecisionTree toCopy)
Copy constructor- Parameters:
toCopy- the object to copy
-
-
Method Detail
-
setRandomFeatureCount
public void setRandomFeatureCount(int numFeatures)
Sets the number of random features to and use at each node of the decision tree- Parameters:
numFeatures- the number of random features
-
getRandomFeatureCount
public int getRandomFeatureCount()
Returns the number of random features used at each node of the tree- Returns:
- the number of random features used at each node of the tree
-
clone
public RandomDecisionTree clone()
- Specified by:
clonein interfaceClassifier- Specified by:
clonein interfaceRegressor- Overrides:
clonein classDecisionTree
-
-
DataMelt 3.0 © DataMelt by jWork.ORG