Package moa.clusterers.dstream
Class Dstream
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.clusterers.AbstractClusterer
-
- moa.clusterers.dstream.Dstream
-
- All Implemented Interfaces:
Configurable
,Serializable
,Clusterer
,AWTRenderable
,MOAObject
,OptionHandler
public class Dstream extends AbstractClusterer
Citation: Y. Chen and L. Tu, “Density-Based Clustering for Real-Time Stream Data,” in Proceedings of the 13th ACM SIGKDD international conference on Knowledge discovery and data mining, 2007, pp. 133–142.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description FloatOption
betaOption
FloatOption
clOption
FloatOption
cmOption
FloatOption
decayFactorOption
-
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 Dstream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
adjustParameters()
Clustering
getClusteringResult()
int
getCurrTime()
double
getDecayFactor()
double
getDL()
double
getDM()
void
getModelDescription(StringBuilder out, int indent)
protected Measurement[]
getModelMeasurementsImpl()
double[]
getVotesForInstance(Instance inst)
boolean
isRandomizable()
void
printDStreamState()
Prints out the values of the parameters associated with this instance of the D-Stream algorithm: gap; decay factor (lambda); C_m and C_l; D_m and D_l; and beta.void
printGridClusters()
Iterates through cluster_list and prints out each grid cluster therein as a string.void
printGridList()
Iterates through grid_list and prints out each density grid therein as a string.void
printInst(Instance inst)
void
resetLearningImpl()
void
trainOnInstanceImpl(Instance inst)
-
Methods inherited from class moa.clusterers.AbstractClusterer
contextIsCompatible, copy, getAttributeNameString, getAWTRenderer, getClassLabelString, getClassNameString, getDescription, getMicroClusteringResult, getModelContext, getModelMeasurements, getNominalValueString, getPurposeString, getSubClusterers, implementsMicroClusterer, keepClassLabel, modelAttIndexToInstanceAttIndex, modelAttIndexToInstanceAttIndex, prepareForUseImpl, 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
-
decayFactorOption
public FloatOption decayFactorOption
-
cmOption
public FloatOption cmOption
-
clOption
public FloatOption clOption
-
betaOption
public FloatOption betaOption
-
-
Method Detail
-
isRandomizable
public boolean isRandomizable()
- See Also:
D-Stream is not randomizable.
-
getVotesForInstance
public double[] getVotesForInstance(Instance inst)
- See Also:
D-Stream does not vote on instances.
-
getClusteringResult
public Clustering getClusteringResult()
- See Also:
Clusterer.getClusteringResult()
-
resetLearningImpl
public void resetLearningImpl()
- Specified by:
resetLearningImpl
in classAbstractClusterer
- See Also:
AbstractClusterer.resetLearningImpl()
-
trainOnInstanceImpl
public void trainOnInstanceImpl(Instance inst)
- Specified by:
trainOnInstanceImpl
in classAbstractClusterer
- See Also:
trainOnInstanceImpl implements the procedure given in Figure 1 of Chen and Tu 2007
-
getModelMeasurementsImpl
protected Measurement[] getModelMeasurementsImpl()
- Specified by:
getModelMeasurementsImpl
in classAbstractClusterer
- See Also:
AbstractClusterer.getModelMeasurementsImpl()
-
getModelDescription
public void getModelDescription(StringBuilder out, int indent)
- Specified by:
getModelDescription
in classAbstractClusterer
- See Also:
AbstractClusterer.getModelDescription(java.lang.StringBuilder, int)
-
getCurrTime
public int getCurrTime()
- Returns:
- currTime - the stream's internal time
-
getDecayFactor
public double getDecayFactor()
- Returns:
- decay factor - represented as lambda in Chen and Tu 2007
-
getDM
public double getDM()
- Returns:
- dm - the density threshold for dense grids. It is controlled by cl and given in eq 8 of Chen and Tu 2007
-
getDL
public double getDL()
- Returns:
- dl - the density threshold for sparse grids. It is controlled by cl and given in eq 9 of Chen and Tu 2007
-
printInst
public void printInst(Instance inst)
-
printDStreamState
public void printDStreamState()
Prints out the values of the parameters associated with this instance of the D-Stream algorithm:- gap;
- decay factor (lambda);
- C_m and C_l;
- D_m and D_l; and
- beta.
-
printGridList
public void printGridList()
Iterates through grid_list and prints out each density grid therein as a string.- See Also:
grid_list
,DensityGrid.toString()
-
printGridClusters
public void printGridClusters()
Iterates through cluster_list and prints out each grid cluster therein as a string.- See Also:
cluster_list
,GridCluster.toString()
-
adjustParameters
public void adjustParameters()
- Overrides:
adjustParameters
in classAbstractClusterer
-
-