Configurable
, java.io.Serializable
, CapabilitiesHandler
, Classifier
, MultiClassClassifier
, Regressor
, AWTRenderable
, Learner<Example<Instance>>
, MOAObject
, OptionHandler
public class kNNwithPAW extends kNN implements MultiClassClassifier
Valid options are:
-k number of neighbours
Modifier and Type | Field | Description |
---|---|---|
protected int |
marker |
|
protected double |
prob |
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
config
kOption, limitOption, medianOption, nearestNeighbourSearchOption, window
Constructor | Description |
---|---|
kNNwithPAW() |
Modifier and Type | Method | Description |
---|---|---|
void |
getModelDescription(java.lang.StringBuilder out,
int indent) |
Returns a string representation of the model.
|
java.lang.String |
getPurposeString() |
Dictionary with option texts and objects
|
boolean |
isRandomizable() |
Gets whether this learner needs a random seed.
|
void |
resetLearningImpl() |
Resets this classifier.
|
void |
trainOnInstanceImpl(Instance inst) |
Trains this classifier incrementally using the given instance.
The reason for ...Impl methods: ease programmer burden by not requiring them to remember calls to super in overridden methods. |
contextIsCompatible, copy, correctlyClassifies, defineImmutableCapabilities, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getPredictionForInstance, getSubClassifiers, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
copy, measureByteSize, measureByteSize, toString
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
getCapabilities
getModelMeasurementsImpl, getVotesForInstance, setModelContext
measureByteSize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCLICreationString, getOptions, prepareForUse, prepareForUse
public java.lang.String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class kNN
public void resetLearningImpl()
AbstractClassifier
resetLearningImpl
in class kNN
public void trainOnInstanceImpl(Instance inst)
AbstractClassifier
trainOnInstanceImpl
in class kNN
inst
- the instance to be used for trainingpublic void getModelDescription(java.lang.StringBuilder out, int indent)
AbstractClassifier
getModelDescription
in class kNN
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic boolean isRandomizable()
Learner
isRandomizable
in interface Learner<Example<Instance>>
isRandomizable
in class kNN
Copyright © 2020 University of Waikato, Hamilton, NZ. All Rights Reserved.