|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,Clustering<Model>>
de.lmu.ifi.dbs.elki.algorithm.clustering.SNNClustering<O,D>
O - the type of DatabaseObject the algorithm is applied onD - the type of Distance used for the preprocessing of the shared nearest neighbors neighborhood listspublic class SNNClustering<O extends DatabaseObject,D extends Distance<D>>
Shared nearest neighbor clustering.
Reference:
L. Ertöz, M. Steinbach, V. Kumar: Finding Clusters of Different Sizes, Shapes, and Densities in Noisy, High Dimensional Data.
In: Proc. of SIAM Data Mining (SDM), 2003.
| Field Summary | |
|---|---|
private IntegerDistance |
epsilon
Holds the value of EPSILON_PARAM. |
static OptionID |
EPSILON_ID
OptionID for EPSILON_PARAM |
private IntParameter |
EPSILON_PARAM
Parameter to specify the minimum SNN density, must be an integer greater than 0. |
private int |
minpts
Holds the value of MINPTS_PARAM. |
static OptionID |
MINPTS_ID
OptionID for MINPTS_PARAM |
private IntParameter |
MINPTS_PARAM
Parameter to specify the threshold for minimum number of points in the epsilon-SNN-neighborhood of a point, must be an integer greater than 0. |
protected Set<Integer> |
noise
Holds a set of noise. |
protected Set<Integer> |
processedIDs
Holds a set of processed ids. |
protected Clustering<Model> |
result
Provides the result of the algorithm. |
protected List<List<Integer>> |
resultList
Holds a list of clusters found. |
private SharedNearestNeighborSimilarityFunction<O,D> |
similarityFunction
The similarity function for the shared nearest neighbor similarity. |
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
optionHandler |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug, logger |
| Constructor Summary | |
|---|---|
SNNClustering()
Provides a shared nearest neighbor clustering algorithm, adding parameters EPSILON_PARAM and MINPTS_PARAM
to the option handler
additionally to parameters of super class. |
|
| Method Summary | |
|---|---|
protected void |
expandCluster(Database<O> database,
Integer startObjectID,
FiniteProgress objprog,
IndefiniteProgress clusprog)
DBSCAN-function expandCluster adapted to SNN criterion. |
protected List<Integer> |
findSNNNeighbors(Database<O> database,
Integer queryObject)
Returns the shared nearest neighbors of the specified query object in the given database. |
Description |
getDescription()
Returns a description of the algorithm. |
IntegerDistance |
getEpsilon()
Returns the value of EPSILON_PARAM. |
Clustering<Model> |
getResult()
Retrieve the result. |
protected Clustering<Model> |
runInTime(Database<O> database)
Performs the SNN clustering algorithm on the given database. |
List<String> |
setParameters(List<String> args)
Calls the super method and sets additionally the values of the parameters EPSILON_PARAM and MINPTS_PARAM. |
| Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm |
|---|
isTime, isVerbose, run, setTime, setVerbose |
| Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
| Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.lmu.ifi.dbs.elki.algorithm.clustering.ClusteringAlgorithm |
|---|
run |
| Methods inherited from interface de.lmu.ifi.dbs.elki.algorithm.Algorithm |
|---|
setTime, setVerbose |
| Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
|---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
| Field Detail |
|---|
public static final OptionID EPSILON_ID
EPSILON_PARAM
private final IntParameter EPSILON_PARAM
Key: -snn.epsilon
private IntegerDistance epsilon
EPSILON_PARAM.
public static final OptionID MINPTS_ID
MINPTS_PARAM
private final IntParameter MINPTS_PARAM
Key: -snn.minpts
private int minpts
MINPTS_PARAM.
protected List<List<Integer>> resultList
protected Clustering<Model> result
protected Set<Integer> noise
protected Set<Integer> processedIDs
private SharedNearestNeighborSimilarityFunction<O extends DatabaseObject,D extends Distance<D>> similarityFunction
| Constructor Detail |
|---|
public SNNClustering()
EPSILON_PARAM and MINPTS_PARAM
to the option handler
additionally to parameters of super class.
| Method Detail |
|---|
protected Clustering<Model> runInTime(Database<O> database)
runInTime in class AbstractAlgorithm<O extends DatabaseObject,Clustering<Model>>database - the database to run the algorithm on
protected List<Integer> findSNNNeighbors(Database<O> database,
Integer queryObject)
database - the database holding the objectsqueryObject - the query object
protected void expandCluster(Database<O> database,
Integer startObjectID,
FiniteProgress objprog,
IndefiniteProgress clusprog)
database - the database on which the algorithm is runstartObjectID - potential seed of a new potential clusterobjprog - the progress object to report about the progress of clusteringpublic Description getDescription()
Algorithm
getDescription in interface Algorithm<O extends DatabaseObject,Clustering<Model>>
public List<String> setParameters(List<String> args)
throws ParameterException
EPSILON_PARAM and MINPTS_PARAM.
The remaining parameters are passed to the similarityFunction.
setParameters in interface ParameterizablesetParameters in class AbstractAlgorithm<O extends DatabaseObject,Clustering<Model>>args - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-settingpublic Clustering<Model> getResult()
ClusteringAlgorithm
getResult in interface Algorithm<O extends DatabaseObject,Clustering<Model>>getResult in interface ClusteringAlgorithm<Clustering<Model>,O extends DatabaseObject>public IntegerDistance getEpsilon()
EPSILON_PARAM.
EPSILON_PARAM
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||