Package weka.clusterers
Class DBSCAN
java.lang.Object
weka.clusterers.AbstractClusterer
weka.clusterers.DBSCAN
- All Implemented Interfaces:
Serializable,Cloneable,Clusterer,CapabilitiesHandler,OptionHandler,RevisionHandler,TechnicalInformationHandler
Basic implementation of DBSCAN clustering algorithm that should *not* be used as a reference for runtime benchmarks: more sophisticated implementations exist! Clustering of new instances is not supported. More info:
Martin Ester, Hans-Peter Kriegel, Joerg Sander, Xiaowei Xu: A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. In: Second International Conference on Knowledge Discovery and Data Mining, 226-231, 1996. BibTeX:
Martin Ester, Hans-Peter Kriegel, Joerg Sander, Xiaowei Xu: A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise. In: Second International Conference on Knowledge Discovery and Data Mining, 226-231, 1996. BibTeX:
@inproceedings{Ester1996,
author = {Martin Ester and Hans-Peter Kriegel and Joerg Sander and Xiaowei Xu},
booktitle = {Second International Conference on Knowledge Discovery and Data Mining},
editor = {Evangelos Simoudis and Jiawei Han and Usama M. Fayyad},
pages = {226-231},
publisher = {AAAI Press},
title = {A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise},
year = {1996}
}
Valid options are:
-E <double> epsilon (default = 0.9)
-M <int> minPoints (default = 6)
-I <String> index (database) used for DBSCAN (default = weka.clusterers.forOPTICSAndDBScan.Databases.SequentialDatabase)
-D <String> distance-type (default = weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclideanDataObject)
- Version:
- $Revision: 9434 $
- Author:
- Matthias Schubert (schubert@dbs.ifi.lmu.de), Zhanna Melnikova-Albrecht (melnikov@cip.ifi.lmu.de), Rainer Holzmann (holzmann@cip.ifi.lmu.de)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildClusterer(Instances instances) Generate Clustering via DBSCANintclusterInstance(Instance instance) Classifies a given instance.Returns the tip text for this propertyReturns the tip text for this propertydatabaseForName(String database_Type, Instances instances) Returns a new Class-Instance of the specified databasedataObjectForName(String database_distanceType, Instance instance, String key, Database database) Returns a new Class-Instance of the specified databaseReturns the tip text for this propertyReturns default capabilities of the clusterer.Returns the distance-typeReturns the type of the used index (database)doubleReturns the value of epsilonintReturns the value of minPointsString[]Gets the current option settings for the OptionHandler.Returns the revision string.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.Returns a string describing this DataMining-AlgorithmReturns an enumeration of all the available options..static voidMain Method for testing DBSCANReturns the tip text for this propertyintReturns the number of clusters.voidsetDatabase_distanceType(String database_distanceType) Sets a new distance-typevoidsetDatabase_Type(String database_Type) Sets a new database-typevoidsetEpsilon(double epsilon) Sets a new value for epsilonvoidsetMinPoints(int minPoints) Sets a new value for minPointsvoidsetOptions(String[] options) Sets the OptionHandler's options using the given list.toString()Returns a description of the clustererMethods inherited from class weka.clusterers.AbstractClusterer
distributionForInstance, forName, makeCopies, makeCopy
-
Constructor Details
-
DBSCAN
public DBSCAN()
-
-
Method Details
-
getCapabilities
Returns default capabilities of the clusterer.- Specified by:
getCapabilitiesin interfaceCapabilitiesHandler- Specified by:
getCapabilitiesin interfaceClusterer- Overrides:
getCapabilitiesin classAbstractClusterer- Returns:
- the capabilities of this clusterer
- See Also:
-
buildClusterer
Generate Clustering via DBSCAN- Specified by:
buildClustererin interfaceClusterer- Specified by:
buildClustererin classAbstractClusterer- Parameters:
instances- The instances that need to be clustered- Throws:
Exception- If clustering was not successful
-
clusterInstance
Classifies a given instance.- Specified by:
clusterInstancein interfaceClusterer- Overrides:
clusterInstancein classAbstractClusterer- Parameters:
instance- The instance to be assigned to a cluster- Returns:
- int The number of the assigned cluster as an integer
- Throws:
Exception- If instance could not be clustered successfully
-
numberOfClusters
Returns the number of clusters.- Specified by:
numberOfClustersin interfaceClusterer- Specified by:
numberOfClustersin classAbstractClusterer- Returns:
- int The number of clusters generated for a training dataset.
- Throws:
Exception- if number of clusters could not be returned successfully
-
listOptions
Returns an enumeration of all the available options..- Specified by:
listOptionsin interfaceOptionHandler- Returns:
- Enumeration An enumeration of all available options.
-
setOptions
Sets the OptionHandler's options using the given list. All options will be set (or reset) during this call (i.e. incremental setting of options is not possible). Valid options are:-E <double> epsilon (default = 0.9)
-M <int> minPoints (default = 6)
-I <String> index (database) used for DBSCAN (default = weka.clusterers.forOPTICSAndDBScan.Databases.SequentialDatabase)
-D <String> distance-type (default = weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclideanDataObject)
- Specified by:
setOptionsin interfaceOptionHandler- Parameters:
options- The list of options as an array of strings- Throws:
Exception- If an option is not supported
-
getOptions
Gets the current option settings for the OptionHandler.- Specified by:
getOptionsin interfaceOptionHandler- Returns:
- String[] The list of current option settings as an array of strings
-
databaseForName
Returns a new Class-Instance of the specified database- Parameters:
database_Type- String of the specified databaseinstances- Instances that were delivered from WEKA- Returns:
- Database New constructed Database
-
dataObjectForName
public DataObject dataObjectForName(String database_distanceType, Instance instance, String key, Database database) Returns a new Class-Instance of the specified database- Parameters:
database_distanceType- String of the specified distance-typeinstance- The original instance that needs to hold by this DataObjectkey- Key for this DataObjectdatabase- Link to the database- Returns:
- DataObject New constructed DataObject
-
setMinPoints
public void setMinPoints(int minPoints) Sets a new value for minPoints- Parameters:
minPoints- MinPoints
-
setEpsilon
public void setEpsilon(double epsilon) Sets a new value for epsilon- Parameters:
epsilon- Epsilon
-
getEpsilon
public double getEpsilon()Returns the value of epsilon- Returns:
- double Epsilon
-
getMinPoints
public int getMinPoints()Returns the value of minPoints- Returns:
- int MinPoints
-
getDatabase_distanceType
Returns the distance-type- Returns:
- String Distance-type
-
getDatabase_Type
Returns the type of the used index (database)- Returns:
- String Index-type
-
setDatabase_distanceType
Sets a new distance-type- Parameters:
database_distanceType- The new distance-type
-
setDatabase_Type
Sets a new database-type- Parameters:
database_Type- The new database-type
-
epsilonTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
minPointsTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
database_TypeTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
database_distanceTypeTipText
Returns the tip text for this property- Returns:
- tip text for this property suitable for displaying in the explorer/experimenter gui
-
globalInfo
Returns a string describing this DataMining-Algorithm- Returns:
- String Information for the gui-explorer
-
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.- Specified by:
getTechnicalInformationin interfaceTechnicalInformationHandler- Returns:
- the technical information about this class
-
toString
Returns a description of the clusterer -
getRevision
Returns the revision string.- Specified by:
getRevisionin interfaceRevisionHandler- Overrides:
getRevisionin classAbstractClusterer- Returns:
- the revision
-
main
Main Method for testing DBSCAN- Parameters:
args- Valid parameters are: 'E' epsilon (default = 0.9); 'M' minPoints (default = 6); 'I' index-type (default = weka.clusterers.forOPTICSAndDBScan.Databases.SequentialDatabase); 'D' distance-type (default = weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclideanDataObject);
-