Package elki.clustering.kmedoids
Class FasterPAM.Instance
- java.lang.Object
-
- elki.clustering.kmedoids.PAM.Instance
-
- elki.clustering.kmedoids.FastPAM1.Instance
-
- elki.clustering.kmedoids.FastPAM.Instance
-
- elki.clustering.kmedoids.FasterPAM.Instance
-
protected static class FasterPAM.Instance extends FastPAM.Instance
Instance for a single dataset.Note: we experimented with not caching the distance to nearest and second nearest, but only the assignments. The matrix lookup was more expensive, so this is probably worth the 2*n doubles in storage.
- Author:
- Erich Schubert
-
-
Field Summary
-
Fields inherited from class elki.clustering.kmedoids.FastPAM.Instance
fastswap
-
Fields inherited from class elki.clustering.kmedoids.PAM.Instance
assignment, distQ, ids, nearest, second
-
-
Constructor Summary
Constructors Constructor Description Instance(DistanceQuery<?> distQ, DBIDs ids, WritableIntegerDataStore assignment)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
run(ArrayModifiableDBIDs medoids, int maxiter)
Run the PAM optimization phase.-
Methods inherited from class elki.clustering.kmedoids.FastPAM.Instance
computeReassignmentCost, findBestSwaps
-
Methods inherited from class elki.clustering.kmedoids.FastPAM1.Instance
assignToNearestCluster, computeReassignmentCost, updateAssignment, updatePriorCost, updateSecondNearest
-
-
-
-
Constructor Detail
-
Instance
public Instance(DistanceQuery<?> distQ, DBIDs ids, WritableIntegerDataStore assignment)
Constructor.- Parameters:
distQ
- Distance queryids
- IDs to processassignment
- Cluster assignment
-
-
Method Detail
-
run
protected double run(ArrayModifiableDBIDs medoids, int maxiter)
Run the PAM optimization phase.- Overrides:
run
in classFastPAM.Instance
- Parameters:
medoids
- Medoids listmaxiter
-- Returns:
- final cost
-
-