Package moa.classifiers
Interface Classifier
-
- All Superinterfaces:
AWTRenderable
,Configurable
,Learner<Example<Instance>>
,MOAObject
,OptionHandler
,Serializable
- All Known Subinterfaces:
ALClassifier
,FeatureImportanceClassifier
,MultiLabelClassifier
,MultiLabelLearner
,MultiTargetLearnerSemiSupervised
,MultiTargetRegressor
- All Known Implementing Classes:
AbstractAMRules
,AbstractAMRulesFunctionBasicMlLearner
,AbstractClassifier
,AbstractMultiLabelLearner
,AccuracyUpdatedEnsemble
,AccuracyWeightedEnsemble
,ADACC
,AdaGrad
,AdaHoeffdingOptionTree
,AdaptiveMultiTargetRegressor
,AdaptiveNodePredictor
,AdaptiveRandomForest
,AdaptiveRandomForestRegressor
,ADOB
,ALRandom
,ALUncertainty
,AMRulesMultiLabelClassifier
,AMRulesMultiLabelLearner
,AMRulesMultiLabelLearnerSemiSuper
,AMRulesMultiTargetRegressor
,AMRulesMultiTargetRegressorSemiSuper
,AMRulesRegressor
,AMRulesRegressorOld
,ARFFIMTDD
,ARFHoeffdingTree
,ASHoeffdingTree
,Autoencoder
,BasicMultiLabelClassifier
,BasicMultiLabelLearner
,BasicMultiTargetRegressor
,BinaryClassifierFromRegressor
,BOLE
,CAND
,ChangeDetectorLearner
,ClassifierWithFeatureImportance
,CSMOTE
,DACC
,DecisionStump
,DominantLabelsClassifier
,DriftDetectionMethodClassifier
,DynamicWeightedMajority
,EFDT
,FadingTargetMean
,FeatureImportanceHoeffdingTree
,FeatureImportanceHoeffdingTreeEnsemble
,FIMTDD
,HeterogeneousEnsembleAbstract
,HeterogeneousEnsembleBlast
,HeterogeneousEnsembleBlastFadingFactors
,HoeffdingAdaptiveTree
,HoeffdingAdaptiveTreeClassifLeaves
,HoeffdingOptionTree
,HoeffdingTree
,HoeffdingTreeClassifLeaves
,HSTrees
,Iadem2
,Iadem3
,Iadem3Subtree
,ISOUPTree
,ISOUPTreeRF
,kNN
,kNNwithPAW
,kNNwithPAWandADWIN
,LearnNSE
,LeveragingBag
,LimAttClassifier
,LimAttHoeffdingTree
,LowPassFilteredLearner
,MajorityClass
,MajorityLabelset
,MEKAClassifier
,MLCviaMTR
,MLP
,MultilabelHoeffdingTree
,MultiLabelNaiveBayes
,MultiLabelPerceptronClassification
,MultiLabelRandomAMRules
,MultiTargetMeanRegressor
,MultiTargetNoChange
,MultiTargetPerceptronRegressor
,NaiveBayes
,NaiveBayesMultinomial
,NearestNeighbourDescription
,NoChange
,OCBoost
,OnlineAccuracyUpdatedEnsemble
,OnlineAdaBoost
,OnlineAdaC2
,OnlineCSB2
,OnlineRUSBoost
,OnlineSmoothBoost
,OnlineSMOTEBagging
,OnlineUnderOverBagging
,ORTO
,OzaBag
,OzaBagAdwin
,OzaBagAdwinML
,OzaBagASHT
,OzaBagML
,OzaBoost
,OzaBoostAdwin
,PairedLearners
,Perceptron
,Perceptron
,RandomAMRules
,RandomAMRulesOld
,RandomHoeffdingTree
,RandomRules
,RCD
,RebalanceStream
,RuleClassifier
,RuleClassifierNBayes
,SAMkNN
,SelfOptimisingBaseTree
,SelfOptimisingKNearestLeaves
,SGD
,SGDMultiClass
,SingleClassifierDrift
,SPegasos
,StackedPredictor
,StreamingGradientBoostedTrees
,StreamingRandomPatches
,TargetMean
,TemporallyAugmentedClassifier
,WeightedMajorityAlgorithm
,WEKAClassifier
public interface Classifier extends Learner<Example<Instance>>
Classifier interface for incremental classification models.- Version:
- $Revision: 7 $
- Author:
- Richard Kirkby (rkirkby@cs.waikato.ac.nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Classifier
copy()
Produces a copy of this learner.boolean
correctlyClassifies(Instance inst)
Gets whether this classifier correctly classifies an instance.Prediction
getPredictionForInstance(Instance inst)
Gets the reference to the header of the data stream.Classifier[]
getSubClassifiers()
Gets the classifiers of this ensemble.double[]
getVotesForInstance(Instance inst)
Predicts the class memberships for a given instance.void
trainOnInstance(Instance inst)
Trains this learner incrementally using the given example.-
Methods inherited from interface moa.gui.AWTRenderable
getAWTRenderer
-
Methods inherited from interface moa.learners.Learner
getModel, getModelContext, getModelMeasurements, getPredictionForInstance, getSublearners, getVotesForInstance, isRandomizable, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance
-
Methods inherited from interface moa.MOAObject
getDescription, measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Method Detail
-
getSubClassifiers
Classifier[] getSubClassifiers()
Gets the classifiers of this ensemble. Returns null if this learner is a single learner.- Returns:
- an array of the learners of the ensemble
-
copy
Classifier copy()
Produces a copy of this learner.- Specified by:
copy
in interfaceMOAObject
- Specified by:
copy
in interfaceOptionHandler
- Returns:
- the copy of this learner
-
correctlyClassifies
boolean correctlyClassifies(Instance inst)
Gets whether this classifier correctly classifies an instance. Uses getVotesForInstance to obtain the prediction and the instance to obtain its true class.- Parameters:
inst
- the instance to be classified- Returns:
- true if the instance is correctly classified
-
trainOnInstance
void trainOnInstance(Instance inst)
Trains this learner incrementally using the given example.- Parameters:
inst
- the instance to be used for training
-
getVotesForInstance
double[] getVotesForInstance(Instance inst)
Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero.- Parameters:
inst
- the instance to be classified- Returns:
- an array containing the estimated membership probabilities of the test instance in each class
-
getPredictionForInstance
Prediction getPredictionForInstance(Instance inst)
Gets the reference to the header of the data stream. The header of the data stream is extended from WEKAInstances
. This header is needed to know the number of classes and attributes- Returns:
- the reference to the data stream header
-
-