Package elki.clustering.dbscan
Class LSDBC<O extends elki.data.NumberVector>
- java.lang.Object
-
- elki.clustering.dbscan.LSDBC<O>
-
- Type Parameters:
O- Object type
- All Implemented Interfaces:
elki.Algorithm,ClusteringAlgorithm<Clustering<Model>>
@Title("LSDBC: Locally Scaled Density Based Clustering") @Reference(authors="E. Bi\u00e7ici, D. Yuret", title="Locally Scaled Density Based Clustering", booktitle="Adaptive and Natural Computing Algorithms", url="https://doi.org/10.1007/978-3-540-71618-1_82", bibkey="DBLP:conf/icannga/BiciciY07") @Priority(100) public class LSDBC<O extends elki.data.NumberVector> extends java.lang.Object implements ClusteringAlgorithm<Clustering<Model>>Locally Scaled Density Based Clustering.This is a variant of DBSCAN which starts with the most dense point first, then expands clusters until density has dropped below a threshold.
Reference:
E. Biçici, D. Yuret
Locally Scaled Density Based Clustering
Adaptive and Natural Computing Algorithms- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected doublealphaAlpha parameter.protected elki.distance.Distance<? super O>distanceDistance function used.protected intkplusNumber of neighbors (+ query point)private static elki.logging.LoggingLOGClass logger.protected static intNOISEConstants used internally.protected static intUNPROCESSEDConstants used internally.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intexpandCluster(int clusterid, elki.database.datastore.WritableIntegerDataStore clusterids, elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq, elki.database.ids.DBIDs neighbors, double maxkdist, elki.logging.progress.FiniteProgress progress)Set-based expand cluster implementation.private voidfillDensities(elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq, elki.database.ids.DBIDs ids, elki.database.datastore.WritableDoubleDataStore dens)Collect all densities into an array for sorting.elki.data.type.TypeInformation[]getInputTypeRestriction()private booleanisLocalMaximum(double kdist, elki.database.ids.DBIDs neighbors, elki.database.datastore.WritableDoubleDataStore kdists)Test if a point is a local density maximum.Clustering<Model>run(elki.database.relation.Relation<O> relation)Run the LSDBC algorithm-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.clustering.ClusteringAlgorithm
autorun
-
-
-
-
Field Detail
-
LOG
private static final elki.logging.Logging LOG
Class logger.
-
kplus
protected int kplus
Number of neighbors (+ query point)
-
alpha
protected double alpha
Alpha parameter.
-
distance
protected elki.distance.Distance<? super O extends elki.data.NumberVector> distance
Distance function used.
-
UNPROCESSED
protected static int UNPROCESSED
Constants used internally.
-
NOISE
protected static int NOISE
Constants used internally.
-
-
Constructor Detail
-
LSDBC
public LSDBC(elki.distance.Distance<? super O> distance, int k, double alpha)
Constructor.- Parameters:
distance- Distance function to usek- Neighborhood size parameteralpha- Alpha parameter
-
-
Method Detail
-
getInputTypeRestriction
public elki.data.type.TypeInformation[] getInputTypeRestriction()
- Specified by:
getInputTypeRestrictionin interfaceelki.Algorithm
-
run
public Clustering<Model> run(elki.database.relation.Relation<O> relation)
Run the LSDBC algorithm- Parameters:
relation- Data relation- Returns:
- Clustering result
-
isLocalMaximum
private boolean isLocalMaximum(double kdist, elki.database.ids.DBIDs neighbors, elki.database.datastore.WritableDoubleDataStore kdists)Test if a point is a local density maximum.- Parameters:
kdist- k-distance of currentneighbors- Neighbor pointskdists- kNN distances- Returns:
truewhen the point is a local maximum
-
expandCluster
protected int expandCluster(int clusterid, elki.database.datastore.WritableIntegerDataStore clusterids, elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq, elki.database.ids.DBIDs neighbors, double maxkdist, elki.logging.progress.FiniteProgress progress)Set-based expand cluster implementation.- Parameters:
clusterid- ID of the current cluster.clusterids- Current object to cluster mapping.knnq- kNNQueryneighbors- Neighbors acquired by initial getNeighbors call.maxkdist- Maximum k-distanceprogress- Progress logging- Returns:
- cluster size
-
fillDensities
private void fillDensities(elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq, elki.database.ids.DBIDs ids, elki.database.datastore.WritableDoubleDataStore dens)Collect all densities into an array for sorting.- Parameters:
knnq- kNN queryids- DBIDs to processdens- Density storage
-
-