Package elki.clustering.kmedoids
Class FastCLARA<V>
- java.lang.Object
-
- elki.clustering.kmedoids.PAM<O>
-
- elki.clustering.kmedoids.FastPAM1<O>
-
- elki.clustering.kmedoids.FastPAM<V>
-
- elki.clustering.kmedoids.FastCLARA<V>
-
- Type Parameters:
V
- Data type
- All Implemented Interfaces:
Algorithm
,ClusteringAlgorithm<Clustering<MedoidModel>>
,KMedoidsClustering<V>
@Reference(authors="Erich Schubert, Peter J. Rousseeuw", title="Faster k-Medoids Clustering: Improving the PAM, CLARA, and CLARANS Algorithms", booktitle="Proc. 12th Int. Conf. Similarity Search and Applications (SISAP\'2019)", url="https://doi.org/10.1007/978-3-030-32047-8_16", bibkey="DBLP:conf/sisap/SchubertR19") public class FastCLARA<V> extends FastPAM<V>
Clustering Large Applications (CLARA) with theFastPAM
improvements, to increase scalability in the number of clusters. This variant will also default to twice the sample size, to improve quality.TODO: use a triangular distance matrix, rather than a hash-map based cache, for a bit better performance and less memory.
Reference:
Erich Schubert, Peter J. Rousseeuw
Faster k-Medoids Clustering: Improving the PAM, CLARA, and CLARANS Algorithms
Proc. 12th Int. Conf. Similarity Search and Applications (SISAP'2019)- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FastCLARA.Par<V>
Parameterization class.-
Nested classes/interfaces inherited from class elki.clustering.kmedoids.FastPAM
FastPAM.Instance
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
keepmed
Keep the previous medoids in the sample (see page 145).private static Logging
LOG
Class logger.(package private) int
numsamples
Number of samples to draw (i.e. iterations).(package private) RandomFactory
random
Random factory for initialization.(package private) double
sampling
Sampling rate.-
Fields inherited from class elki.clustering.kmedoids.PAM
distance, initializer, k, maxiter
-
-
Constructor Summary
Constructors Constructor Description FastCLARA(Distance<? super V> distance, int k, int maxiter, KMedoidsInitialization<V> initializer, double fasttol, int numsamples, double sampling, boolean keepmed, RandomFactory random)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Clustering<MedoidModel>
run(Relation<V> relation)
Run k-medoids clustering.Clustering<MedoidModel>
run(Relation<V> relation, int k, DistanceQuery<? super V> distQ)
Run k-medoids clustering with a given distance query.
Not a very elegant API, but needed for some types of nested k-medoids.-
Methods inherited from class elki.clustering.kmedoids.PAM
getInputTypeRestriction, initialMedoids, wrapResult
-
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 Logging LOG
Class logger.
-
sampling
double sampling
Sampling rate. If less than 1, it is considered to be a relative value.
-
numsamples
int numsamples
Number of samples to draw (i.e. iterations).
-
keepmed
boolean keepmed
Keep the previous medoids in the sample (see page 145).
-
random
RandomFactory random
Random factory for initialization.
-
-
Constructor Detail
-
FastCLARA
public FastCLARA(Distance<? super V> distance, int k, int maxiter, KMedoidsInitialization<V> initializer, double fasttol, int numsamples, double sampling, boolean keepmed, RandomFactory random)
Constructor.- Parameters:
distance
- Distance function to usek
- Number of clusters to producemaxiter
- Maximum number of iterationsinitializer
- Initialization functionnumsamples
- Number of samples (sampling iterations)sampling
- Sampling rate (absolute or relative)keepmed
- Keep the previous medoids in the next samplerandom
- Random generator
-
-
Method Detail
-
run
public Clustering<MedoidModel> run(Relation<V> relation)
Description copied from interface:KMedoidsClustering
Run k-medoids clustering.
-
run
public Clustering<MedoidModel> run(Relation<V> relation, int k, DistanceQuery<? super V> distQ)
Description copied from interface:KMedoidsClustering
Run k-medoids clustering with a given distance query.
Not a very elegant API, but needed for some types of nested k-medoids.
-
-