Package moa.clusterers.meta
Class EnsembleClustererAbstract
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.clusterers.AbstractClusterer
-
- moa.clusterers.meta.EnsembleClustererAbstract
-
- All Implemented Interfaces:
Configurable
,Serializable
,Clusterer
,AWTRenderable
,MOAObject
,OptionHandler
- Direct Known Subclasses:
ConfStream
public abstract class EnsembleClustererAbstract extends AbstractClusterer
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
EnsembleClustererAbstract.EnsembleRunnable
-
Field Summary
Fields Modifier and Type Field Description int
bestModel
ArrayList<Algorithm>
candidateEnsemble
ArrayList<Algorithm>
ensemble
protected ExecutorService
executor
FileOption
fileOption
ArrayList<DataPoint>
windowPoints
-
Fields inherited from class moa.clusterers.AbstractClusterer
clustererRandom, clustering, evaluateMicroClusteringOption, modelContext, randomSeed, randomSeedOption, trainingWeightSeenByModel
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description EnsembleClustererAbstract()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
computePerformanceMeasure(Algorithm algorithm)
protected void
evaluatePerformance()
protected void
generateNewConfigurations()
Clustering
getClusteringResult()
void
getModelDescription(StringBuilder out, int indent)
protected Measurement[]
getModelMeasurementsImpl()
double[]
getVotesForInstance(Instance inst)
void
init()
boolean
isRandomizable()
static void
main(String[] args)
protected double
predictPerformance(Algorithm newAlgorithm)
void
prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.protected void
promoteCandidatesIntoEnsemble()
void
resetLearningImpl()
protected Algorithm
sampleNewConfiguration(ArrayList<Double> silhs, int parentIdx)
protected int
sampleParent(ArrayList<Double> silhs)
void
trainOnInstanceImpl(Instance inst)
protected void
trainRegressor(Algorithm algortihm, double performance)
protected void
updateConfiguration()
protected void
updateRemovalFlags(HashMap<String,Double> bestPerformanceValMap, HashMap<String,Integer> bestPerformanceIdxMap, HashMap<String,Integer> algorithmCount)
-
Methods inherited from class moa.clusterers.AbstractClusterer
adjustParameters, contextIsCompatible, copy, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getMicroClusteringResult, getModelContext, getModelMeasurements, getNominalValueString, getPurposeString, getSubClusterers, implementsMicroClusterer, keepClassLabel, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, resetLearning, setModelContext, setRandomSeed, trainingHasStarted, trainingWeightSeenByModel, 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.MOAObject
measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
getCLICreationString, getOptions, prepareForUse, prepareForUse
-
-
-
-
Field Detail
-
bestModel
public int bestModel
-
executor
protected ExecutorService executor
-
fileOption
public FileOption fileOption
-
-
Method Detail
-
init
public void init()
-
isRandomizable
public boolean isRandomizable()
-
getVotesForInstance
public double[] getVotesForInstance(Instance inst)
-
getClusteringResult
public Clustering getClusteringResult()
-
resetLearningImpl
public void resetLearningImpl()
- Specified by:
resetLearningImpl
in classAbstractClusterer
-
trainOnInstanceImpl
public void trainOnInstanceImpl(Instance inst)
- Specified by:
trainOnInstanceImpl
in classAbstractClusterer
-
updateConfiguration
protected void updateConfiguration()
-
evaluatePerformance
protected void evaluatePerformance()
-
computePerformanceMeasure
protected double computePerformanceMeasure(Algorithm algorithm)
-
promoteCandidatesIntoEnsemble
protected void promoteCandidatesIntoEnsemble()
-
trainRegressor
protected void trainRegressor(Algorithm algortihm, double performance)
-
updateRemovalFlags
protected void updateRemovalFlags(HashMap<String,Double> bestPerformanceValMap, HashMap<String,Integer> bestPerformanceIdxMap, HashMap<String,Integer> algorithmCount)
-
generateNewConfigurations
protected void generateNewConfigurations()
-
sampleNewConfiguration
protected Algorithm sampleNewConfiguration(ArrayList<Double> silhs, int parentIdx)
-
predictPerformance
protected double predictPerformance(Algorithm newAlgorithm)
-
getModelMeasurementsImpl
protected Measurement[] getModelMeasurementsImpl()
- Specified by:
getModelMeasurementsImpl
in classAbstractClusterer
-
getModelDescription
public void getModelDescription(StringBuilder out, int indent)
- Specified by:
getModelDescription
in classAbstractClusterer
-
prepareForUseImpl
public void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
Description copied from class:AbstractOptionHandler
This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implementprepareForUseImpl
and notprepareForUse
sinceprepareForUse
callsprepareForUseImpl
.- Overrides:
prepareForUseImpl
in classAbstractClusterer
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use
-
-