public final class DecisionForest extends Object implements TreeBasedClassifier
DecisionTree
s.DecisionTree
,
Serialized FormConstructor and Description |
---|
DecisionForest(DecisionTree[] trees,
double[] weights,
double[] featureImportances) |
Modifier and Type | Method and Description |
---|---|
double[] |
getFeatureImportances() |
DecisionTree[] |
getTrees() |
double[] |
getWeights() |
Prediction |
predict(Example test) |
String |
toString() |
void |
update(Example train)
Requests that the implementation update its internal state to reflect a new
Example . |
public DecisionForest(DecisionTree[] trees, double[] weights, double[] featureImportances)
public DecisionTree[] getTrees()
DecisionTree
s in the ensemble forestpublic double[] getWeights()
public double[] getFeatureImportances()
public Prediction predict(Example test)
predict
in interface TreeBasedClassifier
test
- example whose target value is to be predicatedPrediction
of the target valuepublic void update(Example train)
TreeBasedClassifier
Example
.
In this case, the Example
should carry a target value to learn from.update
in interface TreeBasedClassifier
train
- new training exampleCopyright © 2014–2018. All rights reserved.