public class OPTICS
extends weka.clusterers.AbstractClusterer
implements weka.core.OptionHandler, weka.core.TechnicalInformationHandler
@inproceedings{Ankerst1999, author = {Mihael Ankerst and Markus M. Breunig and Hans-Peter Kriegel and Joerg Sander}, booktitle = {ACM SIGMOD International Conference on Management of Data}, pages = {49-60}, publisher = {ACM Press}, title = {OPTICS: Ordering Points To Identify the Clustering Structure}, year = {1999} }Valid options are:
-E <double> epsilon (default = 0.9)
-M <int> minPoints (default = 6)
-I <String> index (database) used for OPTICS (default = weka.clusterers.forOPTICSAndDBScan.Databases.SequentialDatabase)
-D <String> distance-type (default = weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclideanDataObject)
-F write results to OPTICS_#TimeStamp#.TXT - File
-no-gui suppress the display of the GUI after building the clusterer
-db-output <file> The file to save the generated database to. If a directory is provided, the database doesn't get saved. The generated file can be viewed with the OPTICS Visualizer: java weka.clusterers.forOPTICSAndDBScan.OPTICS_GUI.OPTICS_Visualizer [file.ser] (default: .)
Constructor and Description |
---|
OPTICS() |
Modifier and Type | Method and Description |
---|---|
void |
buildClusterer(weka.core.Instances instances)
Generate Clustering via OPTICS
|
int |
clusterInstance(weka.core.Instance instance)
Classifies a given instance.
|
java.lang.String |
databaseOutputTipText()
Returns the tip text for this property.
|
java.lang.String |
distanceFunctionTipText()
Returns the tip text for this property.
|
java.lang.String |
epsilonTipText()
Returns the tip text for this property
|
weka.core.Capabilities |
getCapabilities()
Returns default capabilities of the clusterer.
|
java.io.File |
getDatabaseOutput()
Returns the file to save the database to - if directory, database is not
saved.
|
weka.core.DistanceFunction |
getDistanceFunction()
returns the distance function currently in use.
|
double |
getEpsilon()
Returns the value of epsilon
|
int |
getMinPoints()
Returns the value of minPoints
|
java.lang.String[] |
getOptions()
Gets the current option settings for the OptionHandler.
|
java.util.ArrayList |
getResultVector()
Returns the resultVector
|
java.lang.String |
getRevision()
Returns the revision string.
|
SERObject |
getSERObject()
Returns the internal database
|
boolean |
getShowGUI()
Returns the flag for showing the OPTICS visualizer GUI.
|
weka.core.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.
|
boolean |
getWriteOPTICSresults()
Returns the flag for writing actions
|
java.lang.String |
globalInfo()
Returns a string describing this DataMining-Algorithm
|
java.util.Enumeration |
listOptions()
Returns an enumeration of all the available options.
|
static void |
main(java.lang.String[] args)
Main Method for testing OPTICS
|
java.lang.String |
minPointsTipText()
Returns the tip text for this property
|
int |
numberOfClusters()
Returns the number of clusters.
|
void |
setDatabaseOutput(java.io.File value)
Sets the the file to save the generated database to.
|
void |
setDistanceFunction(weka.core.DistanceFunction df)
sets the distance function to use for nearest neighbour search.
|
void |
setEpsilon(double epsilon)
Sets a new value for epsilon
|
void |
setMinPoints(int minPoints)
Sets a new value for minPoints
|
void |
setOptions(java.lang.String[] options)
Sets the OptionHandler's options using the given list.
|
void |
setShowGUI(boolean value)
Sets the flag for displaying the GUI.
|
void |
setWriteOPTICSresults(boolean writeOPTICSresults)
Sets the flag for writing actions
|
java.lang.String |
showGUITipText()
Returns the tip text for this property.
|
java.lang.String |
toString()
Returns a description of the clusterer
|
java.lang.String |
writeOPTICSresultsTipText()
Returns the tip text for this property
|
debugTipText, distributionForInstance, doNotCheckCapabilitiesTipText, forName, getDebug, getDoNotCheckCapabilities, makeCopies, makeCopy, postExecution, preExecution, run, runClusterer, setDebug, setDoNotCheckCapabilities
public weka.core.Capabilities getCapabilities()
getCapabilities
in interface weka.clusterers.Clusterer
getCapabilities
in interface weka.core.CapabilitiesHandler
getCapabilities
in class weka.clusterers.AbstractClusterer
public void buildClusterer(weka.core.Instances instances) throws java.lang.Exception
buildClusterer
in interface weka.clusterers.Clusterer
buildClusterer
in class weka.clusterers.AbstractClusterer
instances
- The instances that need to be clusteredjava.lang.Exception
- If clustering was not successfulpublic int clusterInstance(weka.core.Instance instance) throws java.lang.Exception
clusterInstance
in interface weka.clusterers.Clusterer
clusterInstance
in class weka.clusterers.AbstractClusterer
instance
- The instance to be assigned to a clusterjava.lang.Exception
- If instance could not be clustered
successfullypublic int numberOfClusters() throws java.lang.Exception
numberOfClusters
in interface weka.clusterers.Clusterer
numberOfClusters
in class weka.clusterers.AbstractClusterer
java.lang.Exception
- If number of clusters could not be returned
successfullypublic java.util.Enumeration listOptions()
listOptions
in interface weka.core.OptionHandler
listOptions
in class weka.clusterers.AbstractClusterer
public void setOptions(java.lang.String[] options) throws java.lang.Exception
-E <double> epsilon (default = 0.9)
-M <int> minPoints (default = 6)
-I <String> index (database) used for OPTICS (default = weka.clusterers.forOPTICSAndDBScan.Databases.SequentialDatabase)
-D <String> distance-type (default = weka.clusterers.forOPTICSAndDBScan.DataObjects.EuclideanDataObject)
-F write results to OPTICS_#TimeStamp#.TXT - File
-no-gui suppress the display of the GUI after building the clusterer
-db-output <file> The file to save the generated database to. If a directory is provided, the database doesn't get saved. The generated file can be viewed with the OPTICS Visualizer: java weka.clusterers.forOPTICSAndDBScan.OPTICS_GUI.OPTICS_Visualizer [file.ser] (default: .)
setOptions
in interface weka.core.OptionHandler
setOptions
in class weka.clusterers.AbstractClusterer
options
- The list of options as an array of stringsjava.lang.Exception
- If an option is not supportedpublic java.lang.String[] getOptions()
getOptions
in interface weka.core.OptionHandler
getOptions
in class weka.clusterers.AbstractClusterer
public void setMinPoints(int minPoints)
minPoints
- MinPointspublic void setEpsilon(double epsilon)
epsilon
- Epsilonpublic double getEpsilon()
public int getMinPoints()
public java.lang.String distanceFunctionTipText()
public weka.core.DistanceFunction getDistanceFunction()
public void setDistanceFunction(weka.core.DistanceFunction df) throws java.lang.Exception
df
- the new distance function to usejava.lang.Exception
- if instances cannot be processedpublic boolean getWriteOPTICSresults()
public void setWriteOPTICSresults(boolean writeOPTICSresults)
writeOPTICSresults
- Results are written to a file if the flag is setpublic boolean getShowGUI()
public void setShowGUI(boolean value)
value
- if true, then the OPTICS visualizer GUI will be
displayed after building the clustererpublic java.io.File getDatabaseOutput()
public void setDatabaseOutput(java.io.File value)
value
- the file to save the database to or a directory if
saving is to be ignoredpublic java.util.ArrayList getResultVector()
public java.lang.String epsilonTipText()
public java.lang.String minPointsTipText()
public java.lang.String writeOPTICSresultsTipText()
public java.lang.String showGUITipText()
public java.lang.String databaseOutputTipText()
public java.lang.String globalInfo()
public weka.core.TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface weka.core.TechnicalInformationHandler
public SERObject getSERObject()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface weka.core.RevisionHandler
getRevision
in class weka.clusterers.AbstractClusterer
public static void main(java.lang.String[] args)
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);
'F' write results to OPTICS_#TimeStamp#.TXT - File