public class HoeffdingTreeModel extends Object implements PredictionModel<Data,Serializable>, DescriptionModel<String>
HoeffdingTreeNode
Constructor and Description |
---|
HoeffdingTreeModel(Map<String,Class<?>> featureTypes,
Serializable label)
Creates a new Hoeffding Tree containing only an empty root with an initial label.
Defines a type for each feature. |
Modifier and Type | Method and Description |
---|---|
String |
describe()
Returns a string representation of the current tree
|
HoeffdingTreeNode |
getLeaf(Data example)
Returns the leaf at which the path through the tree ends for the specified
Example . |
Class<?> |
getType(String feature)
Returns the
FeatureType for the specified feature |
Serializable |
predict(Data example)
Returns the predicted class label for the specified example
|
String |
toString()
Returns a string representation of the current tree
|
public HoeffdingTreeModel(Map<String,Class<?>> featureTypes, Serializable label)
featureTypes
- a declaration of types for all featureslabel
- an initial Label for the rootpublic Class<?> getType(String feature)
FeatureType
for the specified featurefeature
- a feature which type is requestedFeatureType
for the specified featurepublic Serializable predict(Data example)
predict
in interface PredictionModel<Data,Serializable>
example
- an Example
for which a prediction should be madepublic HoeffdingTreeNode getLeaf(Data example)
Example
.example
- an Example
public String describe()
describe
in interface DescriptionModel<String>
Copyright © 2014. All rights reserved.