Package moa.classifiers.multilabel.meta
Class OzaBagML
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.AbstractClassifier
-
- moa.classifiers.meta.OzaBag
-
- moa.classifiers.multilabel.meta.OzaBagML
-
- All Implemented Interfaces:
Configurable
,Serializable
,CapabilitiesHandler
,Classifier
,MultiClassClassifier
,MultiLabelLearner
,MultiTargetRegressor
,AWTRenderable
,Learner<Example<Instance>>
,MOAObject
,OptionHandler
public class OzaBagML extends OzaBag implements MultiLabelLearner, MultiTargetRegressor
OzaBag for Multi-label data.- Version:
- $Revision: 1 $
- Author:
- Jesse Read
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class moa.classifiers.meta.OzaBag
baseLearnerOption, ensemble, ensembleSizeOption
-
Fields inherited from class moa.classifiers.AbstractClassifier
classifierRandom, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description OzaBagML()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Prediction
combinePredictions(Prediction[] predictions, Instance inst)
static Prediction
compilePredictions(Classifier[] h, Example example)
static double[]
compileVotes(Classifier[] h, Instance inst)
Prediction
getPredictionForInstance(MultiLabelInstance instance)
Prediction
getPredictionForInstance(Example<Instance> example)
double[]
getVotesForInstance(Instance inst)
Predicts the class memberships for a given instance.void
trainOnInstanceImpl(MultiLabelInstance inst)
-
Methods inherited from class moa.classifiers.meta.OzaBag
defineImmutableCapabilities, getModelDescription, getModelMeasurementsImpl, getPurposeString, getSubClassifiers, isRandomizable, resetLearningImpl, trainOnInstanceImpl
-
Methods inherited from class moa.classifiers.AbstractClassifier
contextIsCompatible, copy, correctlyClassifies, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getModel, getModelContext, getModelMeasurements, getNominalValueString, getPredictionForInstance, getSublearners, getVotesForInstance, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, trainOnInstance, trainOnInstance
-
Methods inherited from class moa.options.AbstractOptionHandler
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.gui.AWTRenderable
getAWTRenderer
-
Methods inherited from interface moa.capabilities.CapabilitiesHandler
getCapabilities
-
Methods inherited from interface moa.classifiers.Classifier
copy, correctlyClassifies, getPredictionForInstance, getSubClassifiers, trainOnInstance
-
Methods inherited from interface moa.learners.Learner
getModel, getModelContext, getModelMeasurements, 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
-
trainOnInstanceImpl
public void trainOnInstanceImpl(MultiLabelInstance inst)
- Specified by:
trainOnInstanceImpl
in interfaceMultiLabelLearner
-
getPredictionForInstance
public Prediction getPredictionForInstance(Example<Instance> example)
- Specified by:
getPredictionForInstance
in interfaceLearner<Example<Instance>>
- Overrides:
getPredictionForInstance
in classAbstractClassifier
-
compilePredictions
public static Prediction compilePredictions(Classifier[] h, Example example)
-
combinePredictions
public static Prediction combinePredictions(Prediction[] predictions, Instance inst)
-
getVotesForInstance
public double[] getVotesForInstance(Instance inst)
Description copied from interface:Classifier
Predicts the class memberships for a given instance. If an instance is unclassified, the returned array elements must be all zero.- Specified by:
getVotesForInstance
in interfaceClassifier
- Overrides:
getVotesForInstance
in classOzaBag
- Parameters:
inst
- the instance to be classified- Returns:
- an array containing the estimated membership probabilities of the test instance in each class
-
compileVotes
public static double[] compileVotes(Classifier[] h, Instance inst)
-
getPredictionForInstance
public Prediction getPredictionForInstance(MultiLabelInstance instance)
- Specified by:
getPredictionForInstance
in interfaceMultiLabelLearner
-
-