public class ERTrees extends ExtraTree
ExtraTree
. The randomness of the trees provides incredibly high
variance, yet a low bias. The sum of many randomized trees proves to be
a powerful and fast learner. Constructor and Description |
---|
ERTrees()
Creates a new Extremely Randomized Trees learner
|
ERTrees(int forrestSize)
Creates a new Extremely Randomized Trees learner
|
Modifier and Type | Method and Description |
---|---|
CategoricalResults |
classify(DataPoint data)
Performs classification on the given data point.
|
ERTrees |
clone() |
<Type extends DataSet> |
evaluateFeatureImportance(DataSet<Type> data)
Measures the statistics of feature importance from the trees in this
forest.
|
<Type extends DataSet> |
evaluateFeatureImportance(DataSet<Type> data,
TreeFeatureImportanceInference imp)
Measures the statistics of feature importance from the trees in this
forest.
|
int |
getForrestSize() |
TreeNodeVisitor |
getTreeNodeVisitor()
Obtains a node visitor for the tree learner that can be used to traverse
and predict from the learned tree
|
boolean |
getUseDefaultSelectionCount()
Returns if the default heuristic for the selection count is used
|
boolean |
getUseDefaultStopSize()
Returns if the default heuristic for the stop size is used
|
double |
regress(DataPoint data) |
void |
setForrestSize(int forrestSize) |
void |
setUseDefaultSelectionCount(boolean useDefaultSelectionCount)
Sets whether or not to use the default heuristic for the number of random
features to select as candidates for each node.
|
void |
setUseDefaultStopSize(boolean useDefaultStopSize)
Sets whether or not to us the default heuristic for the number of points
to force a new node to be a leaf.
|
boolean |
supportsWeightedData()
Indicates whether the model knows how to train using weighted data points.
|
void |
train(RegressionDataSet dataSet) |
void |
train(RegressionDataSet dataSet,
ExecutorService threadPool) |
void |
trainC(ClassificationDataSet dataSet)
Trains the classifier and constructs a model for classification using the
given data set.
|
void |
trainC(ClassificationDataSet dataSet,
ExecutorService threadPool)
Trains the classifier and constructs a model for classification using the
given data set.
|
getImpurityMeasure, getParameter, getParameters, getSelectionCount, getStopSize, isBinaryCategoricalSplitting, setBinaryCategoricalSplitting, setImpurityMeasure, setSelectionCount, setStopSize
public ERTrees()
public ERTrees(int forrestSize)
forrestSize
- the number of trees to constructpublic <Type extends DataSet> OnLineStatistics[] evaluateFeatureImportance(DataSet<Type> data)
MDI
method with Gini
impurity will be used. For others, the ImportanceByUses
method
will be used. This may change in the future.Type
- data
- the dataset to infer the feature importance from with respect
to the current model.public <Type extends DataSet> OnLineStatistics[] evaluateFeatureImportance(DataSet<Type> data, TreeFeatureImportanceInference imp)
Type
- data
- the dataset to infer the feature importance from with respect
to the current model.imp
- the method of determing the feature importance that will be
applied to each tree in this modelpublic void setUseDefaultSelectionCount(boolean useDefaultSelectionCount)
useDefaultSelectionCount
- whether or not to use the heuristic
versionpublic boolean getUseDefaultSelectionCount()
public void setUseDefaultStopSize(boolean useDefaultStopSize)
useDefaultStopSize
- whether or not to use the heuristic versionpublic boolean getUseDefaultStopSize()
public void setForrestSize(int forrestSize)
public int getForrestSize()
public CategoricalResults classify(DataPoint data)
Classifier
classify
in interface Classifier
classify
in class ExtraTree
data
- the data point to classifypublic void trainC(ClassificationDataSet dataSet, ExecutorService threadPool)
Classifier
trainC
in interface Classifier
trainC
in class ExtraTree
dataSet
- the data set to train onthreadPool
- the source of threads to use.public void trainC(ClassificationDataSet dataSet)
Classifier
trainC
in interface Classifier
trainC
in class ExtraTree
dataSet
- the data set to train onpublic boolean supportsWeightedData()
Classifier
supportsWeightedData
in interface Classifier
supportsWeightedData
in interface Regressor
supportsWeightedData
in class ExtraTree
public double regress(DataPoint data)
public void train(RegressionDataSet dataSet, ExecutorService threadPool)
public void train(RegressionDataSet dataSet)
public ERTrees clone()
public TreeNodeVisitor getTreeNodeVisitor()
TreeLearner
getTreeNodeVisitor
in interface TreeLearner
getTreeNodeVisitor
in class ExtraTree
Copyright © 2017. All rights reserved.