Class ParkJun<O>
- java.lang.Object
-
- elki.clustering.kmedoids.initialization.ParkJun<O>
-
- Type Parameters:
O
- Object type for KMedoids initialization
- All Implemented Interfaces:
KMeansInitialization
,KMedoidsInitialization<O>
@Priority(-100) @Reference(authors="H.-S. Park, C.-H. Jun", title="A simple and fast algorithm for K-medoids clustering", booktitle="Expert Systems with Applications 36(2)", url="https://doi.org/10.1016/j.eswa.2008.01.039", bibkey="DBLP:journals/eswa/ParkJ09") public class ParkJun<O> extends java.lang.Object implements KMeansInitialization, KMedoidsInitialization<O>
Initialization method proposed by Park and Jun.It is easy to imagine that this approach can become problematic, because it does not take the distances between medoids into account. In the worst case, it may choose k duplicates as initial centers, therefore we cannot recommend this strategy, but it is provided for completeness.
Reference:
H.-S. Park, C.-H. Jun
A simple and fast algorithm for K-medoids clustering
Expert Systems with Applications 36(2)- Since:
- 0.7.5
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ParkJun.Par<V>
Parameterization class.
-
Constructor Summary
Constructors Constructor Description ParkJun()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double[][]
chooseInitialMeans(Relation<? extends NumberVector> relation, int k, NumberVectorDistance<?> distance)
Choose initial meansDBIDs
chooseInitialMedoids(int k, DBIDs ids, DistanceQuery<? super O> distQ)
Choose initial means
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Class logger.
-
-
Method Detail
-
chooseInitialMeans
public double[][] chooseInitialMeans(Relation<? extends NumberVector> relation, int k, NumberVectorDistance<?> distance)
Description copied from interface:KMeansInitialization
Choose initial means- Specified by:
chooseInitialMeans
in interfaceKMeansInitialization
- Parameters:
relation
- Relationk
- Parameter kdistance
- Distance function- Returns:
- List of chosen means for k-means
-
chooseInitialMedoids
public DBIDs chooseInitialMedoids(int k, DBIDs ids, DistanceQuery<? super O> distQ)
Description copied from interface:KMedoidsInitialization
Choose initial means- Specified by:
chooseInitialMedoids
in interfaceKMedoidsInitialization<O>
- Parameters:
k
- Parameter kids
- Candidate IDs.distQ
- Distance function- Returns:
- List of chosen means for k-means
-
-