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 |
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
AbstractClusterer() |
Modifier and Type | Method and Description |
---|---|
static boolean |
contextIsCompatible(InstancesHeader originalContext,
InstancesHeader newContext) |
Clusterer |
copy()
This method produces a copy of this object.
|
String |
getAttributeNameString(int attIndex) |
AWTRenderer |
getAWTRenderer() |
String |
getClassLabelString(int classLabelIndex) |
String |
getClassNameString() |
void |
getDescription(StringBuilder out,
int indent)
Returns a string representation of this object.
|
Clustering |
getMicroClusteringResult() |
InstancesHeader |
getModelContext() |
abstract void |
getModelDescription(StringBuilder out,
int indent) |
Measurement[] |
getModelMeasurements() |
protected abstract Measurement[] |
getModelMeasurementsImpl() |
String |
getNominalValueString(int attIndex,
int valIndex) |
String |
getPurposeString()
Gets the purpose of this object
|
Clusterer[] |
getSubClusterers() |
boolean |
implementsMicroClusterer() |
boolean |
keepClassLabel() |
protected static int |
modelAttIndexToInstanceAttIndex(int index,
weka.core.Instance inst) |
protected static int |
modelAttIndexToInstanceAttIndex(int index,
weka.core.Instances insts) |
void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.
|
void |
resetLearning() |
abstract void |
resetLearningImpl() |
void |
setModelContext(InstancesHeader ih) |
void |
setRandomSeed(int s) |
boolean |
trainingHasStarted() |
double |
trainingWeightSeenByModel() |
void |
trainOnInstance(weka.core.Instance inst) |
abstract void |
trainOnInstanceImpl(weka.core.Instance inst) |
discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, 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()
OptionHandler
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(weka.core.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(weka.core.Instance inst)
protected abstract Measurement[] getModelMeasurementsImpl()
public abstract void getModelDescription(StringBuilder out, int indent)
protected static int modelAttIndexToInstanceAttIndex(int index, weka.core.Instance inst)
protected static int modelAttIndexToInstanceAttIndex(int index, weka.core.Instances insts)
public boolean implementsMicroClusterer()
implementsMicroClusterer
in interface Clusterer
public boolean keepClassLabel()
keepClassLabel
in interface Clusterer
public Clustering getMicroClusteringResult()
getMicroClusteringResult
in interface Clusterer
Copyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.