public abstract class AbstractClusterer extends AbstractOptionHandler implements Clusterer
Modifier and Type | Field and Description |
---|---|
protected Random |
clustererRandom |
protected Clustering |
clustering |
FlagOption |
evaluateMicroClusteringOption |
protected InstancesHeader |
modelContext |
protected int |
randomSeed |
protected IntOption |
randomSeedOption |
protected double |
trainingWeightSeenByModel |
config
Constructor and Description |
---|
AbstractClusterer() |
getCLICreationString, getOptions, getPreparedClassOption, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getClusteringResult, getVotesForInstance, isRandomizable
getCLICreationString, getOptions, prepareForUse, prepareForUse
measureByteSize
protected InstancesHeader modelContext
protected double trainingWeightSeenByModel
protected int randomSeed
protected IntOption randomSeedOption
public FlagOption evaluateMicroClusteringOption
protected Random clustererRandom
protected Clustering clustering
public String getPurposeString()
AbstractOptionHandler
getPurposeString
in interface OptionHandler
getPurposeString
in class AbstractOptionHandler
public void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic void setModelContext(InstancesHeader ih)
setModelContext
in interface Clusterer
public InstancesHeader getModelContext()
getModelContext
in interface Clusterer
public void setRandomSeed(int s)
setRandomSeed
in interface Clusterer
public boolean trainingHasStarted()
trainingHasStarted
in interface Clusterer
public double trainingWeightSeenByModel()
trainingWeightSeenByModel
in interface Clusterer
public void resetLearning()
resetLearning
in interface Clusterer
public void trainOnInstance(Instance inst)
trainOnInstance
in interface Clusterer
public Measurement[] getModelMeasurements()
getModelMeasurements
in interface Clusterer
public void getDescription(StringBuilder out, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
out
- the stringbuilder to add the descriptionindent
- the number of characters to indentpublic Clusterer[] getSubClusterers()
getSubClusterers
in interface Clusterer
public Clusterer copy()
MOAObject
copy
in interface Clusterer
copy
in interface MOAObject
copy
in interface OptionHandler
copy
in class AbstractOptionHandler
public String getClassNameString()
public String getClassLabelString(int classLabelIndex)
public String getAttributeNameString(int attIndex)
public String getNominalValueString(int attIndex, int valIndex)
public static boolean contextIsCompatible(InstancesHeader originalContext, InstancesHeader newContext)
public AWTRenderer getAWTRenderer()
getAWTRenderer
in interface AWTRenderable
public abstract void resetLearningImpl()
public abstract void trainOnInstanceImpl(Instance inst)
protected abstract Measurement[] getModelMeasurementsImpl()
public abstract void getModelDescription(StringBuilder out, int indent)
protected static int modelAttIndexToInstanceAttIndex(int index, Instance inst)
protected static int modelAttIndexToInstanceAttIndex(int index, Instances insts)
public boolean implementsMicroClusterer()
implementsMicroClusterer
in interface Clusterer
public boolean keepClassLabel()
keepClassLabel
in interface Clusterer
public Clustering getMicroClusteringResult()
getMicroClusteringResult
in interface Clusterer
Copyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.