protected static class KMedoidsFastPAM.Instance extends KMedoidsFastPAM1.Instance
Modifier and Type | Field and Description |
---|---|
protected double |
fastswap
Tolerance for fast swapping behavior (may perform worse swaps).
|
assignment, distQ, ids, nearest, second
Constructor and Description |
---|
Instance(DistanceQuery<?> distQ,
DBIDs ids,
WritableIntegerDataStore assignment,
double fasttol)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static int |
argmin(double[] best)
Find the smallest (most negative) value.
|
protected double |
computeReassignmentCost(DBIDRef h,
int mnum)
Compute the reassignment cost of one swap.
|
protected void |
findBestSwaps(DBIDArrayIter m,
ArrayModifiableDBIDs bestids,
double[] best,
double[] cost)
Find the best swaps.
|
protected double |
run(ArrayModifiableDBIDs medoids,
int maxiter)
Run the PAM optimization phase.
|
assignToNearestCluster, computeReassignmentCost, updateAssignment
protected double fastswap
public Instance(DistanceQuery<?> distQ, DBIDs ids, WritableIntegerDataStore assignment, double fasttol)
distQ
- Distance queryids
- IDs to processassignment
- Cluster assignmentfasttol
- Tolerance for fast swappingprotected double run(ArrayModifiableDBIDs medoids, int maxiter)
run
in class KMedoidsFastPAM1.Instance
medoids
- Medoids listmaxiter
- protected void findBestSwaps(DBIDArrayIter m, ArrayModifiableDBIDs bestids, double[] best, double[] cost)
m
- Medoidsbestids
- Storage for best non-medoisbest
- Storage for best costcost
- Scratch space for costprotected static int argmin(double[] best)
best
- Best changesprotected double computeReassignmentCost(DBIDRef h, int mnum)
computeReassignmentCost
in class KMedoidsPAM.Instance
h
- Current object to swap with the medoidmnum
- Medoid number to be replacedCopyright © 2019 ELKI Development Team. License information.