protected static class KMedoidsPAMReynolds.Instance extends KMedoidsPAM.Instance
assignment, distQ, ids, nearest, second
Constructor and Description |
---|
Instance(DistanceQuery<?> distQ,
DBIDs ids,
WritableIntegerDataStore assignment)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected double |
computeReassignmentCost(DBIDRef h,
WritableDoubleDataStore tnearest)
Compute the reassignment cost, for all medoids in one pass.
|
protected double |
computeRemovalCost(int i,
WritableDoubleDataStore tnearest)
Compute the cost of removing a medoid just once.
|
protected double |
run(ArrayModifiableDBIDs medoids,
int maxiter)
Run the PAM optimization phase.
|
assignToNearestCluster, computeReassignmentCost
public Instance(DistanceQuery<?> distQ, DBIDs ids, WritableIntegerDataStore assignment)
distQ
- Distance queryids
- IDs to processassignment
- Cluster assignmentprotected double run(ArrayModifiableDBIDs medoids, int maxiter)
run
in class KMedoidsPAM.Instance
medoids
- Medoids listmaxiter
- protected double computeRemovalCost(int i, WritableDoubleDataStore tnearest)
protected double computeReassignmentCost(DBIDRef h, WritableDoubleDataStore tnearest)
h
- Current object to swap with any medoid.tnearest
- Distance to the nearest except the removed medoidCopyright © 2019 ELKI Development Team. License information.