Configurable
, java.io.Serializable
, CapabilitiesHandler
, Classifier
, MultiClassClassifier
, OneClassClassifier
, AWTRenderable
, Learner<Example<Instance>>
, MOAObject
, OptionHandler
public class HSTrees extends AbstractClassifier implements Classifier, OneClassClassifier
Modifier and Type | Field | Description |
---|---|---|
FloatOption |
anomalyThresholdOption |
|
IntOption |
maxDepthOption |
|
IntOption |
numTreesOption |
|
FloatOption |
sizeLimitOption |
|
IntOption |
windowSizeOption |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
Constructor | Description |
---|---|
HSTrees() |
Modifier and Type | Method | Description |
---|---|---|
double |
getAnomalyScore(Instance inst) |
Returns the anomaly score for the argument instance.
|
void |
getModelDescription(java.lang.StringBuilder out,
int indent) |
Returns a string representation of the model.
|
protected Measurement[] |
getModelMeasurementsImpl() |
Gets the current measurements of this classifier.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
java.lang.String |
getPurposeString() |
Dictionary with option texts and objects
|
double[] |
getVotesForInstance(Instance inst) |
Combine the anomaly scores from each HSTree in the forest and convert into a vote score.
|
void |
initialize(java.util.Collection<Instance> trainingPoints) |
Initializes the Streaming HS-Trees classifier on the argument trainingPoints.
|
boolean |
isRandomizable() |
HSTrees is randomizable.
|
void |
resetLearningImpl() |
Reset the classifier's parameters and data structures.
|
void |
trainOnInstanceImpl(Instance inst) |
Update the forest with the argument instance
|
contextIsCompatible, copy, correctlyClassifies, defineImmutableCapabilities, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getPredictionForInstance, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
copy, measureByteSize, measureByteSize, toString
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
getAWTRenderer
getCapabilities
copy, correctlyClassifies, getPredictionForInstance, getSubClassifiers, trainOnInstance
getModel, getModelContext, getModelMeasurements, getPredictionForInstance, getSublearners, getVotesForInstance, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
getDescription, measureByteSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
public IntOption windowSizeOption
public IntOption numTreesOption
public IntOption maxDepthOption
public FloatOption anomalyThresholdOption
public FloatOption sizeLimitOption
public java.lang.String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractClassifier
public void resetLearningImpl()
resetLearningImpl
in class AbstractClassifier
public void trainOnInstanceImpl(Instance inst)
trainOnInstanceImpl
in class AbstractClassifier
inst
- the instance to pass to the forestpublic double[] getVotesForInstance(Instance inst)
getVotesForInstance
in interface Classifier
getVotesForInstance
in class AbstractClassifier
inst
- the instance to get votes forpublic double getAnomalyScore(Instance inst)
getAnomalyScore
in interface OneClassClassifier
inst
- the argument instancepublic boolean isRandomizable()
isRandomizable
in interface Learner<Example<Instance>>
protected Measurement[] getModelMeasurementsImpl()
AbstractClassifier
getModelMeasurementsImpl
in class AbstractClassifier
public void getModelDescription(java.lang.StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class AbstractClassifier
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic void initialize(java.util.Collection<Instance> trainingPoints)
initialize
in interface OneClassClassifier
trainingPoints
- the Collection of instance with which to initialize the Streaming Hs-Trees classifier.Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.