public class AdaptiveHoeffdingTreeModel
extends moa.options.AbstractOptionHandler
Constructor and Description |
---|
AdaptiveHoeffdingTreeModel(AdaptiveHoeffdingTreeModel model) |
AdaptiveHoeffdingTreeModel(String modelName) |
Modifier and Type | Method and Description |
---|---|
double |
evaluationTrainOnEvent(ClassifierPrequentialModelEvaluation modelEvaluation,
double[] cepEvent,
String classValue)
Calculate prequential accuracy of the model
|
List<String> |
getClasses() |
void |
getDescription(StringBuilder stringBuilder,
int i) |
String |
getModelName() |
int |
getNoOfFeatures() |
Object[] |
getPrediction(double[] cepEvent)
Predict the class label for event with fearure attributes
|
com.yahoo.labs.samoa.instances.InstancesHeader |
getStreamHeader() |
void |
init(int noOfAttributes,
int noOfClasses)
Initialize the model with input stream definition.
|
protected void |
prepareForUseImpl(moa.tasks.TaskMonitor taskMonitor,
moa.core.ObjectRepository objectRepository) |
void |
setConfigurations(int gracePeriod,
int splittingCriteria,
double allowableSplitError,
double breakTieThreshold,
boolean binarySplitOption,
boolean disablePrePruning,
int leafpredictionStrategy)
Configure Hoeffding Adaptive Tree Model with hyper-parameters.
|
void |
trainOnEvent(double[] cepEvent,
String classLabel)
Train the model on event instance
|
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
public AdaptiveHoeffdingTreeModel(String modelName)
public AdaptiveHoeffdingTreeModel(AdaptiveHoeffdingTreeModel model)
public void getDescription(StringBuilder stringBuilder, int i)
public void init(int noOfAttributes, int noOfClasses)
noOfAttributes
- number of feature attributesnoOfClasses
- number of classespublic void setConfigurations(int gracePeriod, int splittingCriteria, double allowableSplitError, double breakTieThreshold, boolean binarySplitOption, boolean disablePrePruning, int leafpredictionStrategy)
gracePeriod
- number of instances a leaf should observe between split attempts.splittingCriteria
- Split criterion to use. 0:InfoGainSplitCriterion, 1:GiniSplitCriterion".allowableSplitError
- Allowable error in split decision, values closer to 0 will take.breakTieThreshold
- Threshold below which a split will be forced to break ties.binarySplitOption
- Allow binary splits.disablePrePruning
- Disable pre-pruning.leafpredictionStrategy
- Leaf prediction to use.public void trainOnEvent(double[] cepEvent, String classLabel)
cepEvent
- event dataclassLabel
- class label of the cepEventpublic double evaluationTrainOnEvent(ClassifierPrequentialModelEvaluation modelEvaluation, double[] cepEvent, String classValue)
modelEvaluation
- Prequential Model Evaluator.cepEvent
- event dataclassValue
- class label of the cepEventpublic Object[] getPrediction(double[] cepEvent)
cepEvent
- Event data.public String getModelName()
public com.yahoo.labs.samoa.instances.InstancesHeader getStreamHeader()
public int getNoOfFeatures()
protected void prepareForUseImpl(moa.tasks.TaskMonitor taskMonitor, moa.core.ObjectRepository objectRepository)
prepareForUseImpl
in class moa.options.AbstractOptionHandler
Copyright © 2019 WSO2. All rights reserved.