public class CLOPE extends AbstractClusterer implements OptionHandler, TechnicalInformationHandler
@inproceedings{Yang2002, author = {Yiling Yang and Xudong Guan and Jinyuan You}, booktitle = {Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining}, pages = {682-687}, publisher = {ACM New York, NY, USA}, title = {CLOPE: a fast and effective clustering algorithm for transactional data}, year = {2002} }Valid options are:
-R <num> Repulsion (default 2.6)
Modifier and Type | Field and Description |
---|---|
ArrayList<weka.clusterers.CLOPE.CLOPECluster> |
clusters
Array of clusters
|
protected ArrayList<Integer> |
m_clusterAssignments |
protected int |
m_numberOfClusters
Number of clusters
|
protected boolean |
m_numberOfClustersDetermined
whether the number of clusters was already determined
|
protected int |
m_numberOfInstances
Number of instances
|
protected int |
m_processed_InstanceID
Counter for the processed instances
|
protected double |
m_Repulsion
Specifies the repulsion
|
protected double |
m_RepulsionDefault
Specifies the repulsion default
|
Constructor and Description |
---|
CLOPE()
the default constructor
|
Modifier and Type | Method and Description |
---|---|
int |
AddInstanceToBestCluster(Instance inst)
Add instance to best cluster
|
void |
buildClusterer(Instances data)
Generate Clustering via CLOPE
|
int |
clusterInstance(Instance instance)
Classifies a given instance.
|
protected void |
determineNumberOfClusters() |
Capabilities |
getCapabilities()
Returns default capabilities of the clusterer.
|
String[] |
getOptions()
Gets the current settings of CLOPE
|
double |
getRepulsion()
gets the repulsion
|
String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
|
String |
globalInfo()
Returns a string describing this DataMining-Algorithm
|
Enumeration |
listOptions()
Returns an enumeration of all the available options..
|
static void |
main(String[] argv)
Main method for testing this class.
|
int |
MoveInstanceToBestCluster(Instance inst)
Move instance to best cluster
|
int |
numberOfClusters()
Returns the number of clusters.
|
String |
repulsionTipText()
Returns the tip text for this property
|
void |
setOptions(String[] options)
Parses a given list of options.
|
void |
setRepulsion(double value)
set the repulsion
|
String |
toString()
return a string describing this clusterer
|
distributionForInstance, forName, makeCopies, makeCopy, runClusterer
public ArrayList<weka.clusterers.CLOPE.CLOPECluster> clusters
protected double m_RepulsionDefault
protected double m_Repulsion
protected int m_numberOfClusters
protected int m_processed_InstanceID
protected int m_numberOfInstances
protected boolean m_numberOfClustersDetermined
public int numberOfClusters()
AbstractClusterer
numberOfClusters
in interface Clusterer
numberOfClusters
in class AbstractClusterer
protected void determineNumberOfClusters()
public Enumeration listOptions()
OptionHandler
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
-R <num> Repulsion (default 2.6)
setOptions
in interface OptionHandler
options
- the list of options as an array of stringsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
public String repulsionTipText()
public void setRepulsion(double value)
value
- the repulsionException
- if number of clusters is negativepublic double getRepulsion()
public Capabilities getCapabilities()
getCapabilities
in interface Clusterer
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractClusterer
Capabilities
public void buildClusterer(Instances data) throws Exception
buildClusterer
in interface Clusterer
buildClusterer
in class AbstractClusterer
instances
- The instances that need to be clusteredException
- If clustering was not successfulpublic int AddInstanceToBestCluster(Instance inst)
public int MoveInstanceToBestCluster(Instance inst)
public int clusterInstance(Instance instance) throws Exception
clusterInstance
in interface Clusterer
clusterInstance
in class AbstractClusterer
instance
- The instance to be assigned to a clusterException
- If instance could not be clustered
successfullypublic String toString()
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractClusterer
public static void main(String[] argv)
argv
- should contain the following arguments: -t training file [-R repulsion]
Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.