protected static class KMedoidsPAM.Instance
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) WritableIntegerDataStore |
assignment
Cluster mapping.
|
(package private) DistanceQuery<?> |
distQ
Distance function to use.
|
(package private) DBIDs |
ids
Ids to process.
|
(package private) WritableDoubleDataStore |
nearest
Distance to the nearest medoid of each point.
|
(package private) WritableDoubleDataStore |
second
Distance to the second nearest medoid.
|
| Constructor and Description |
|---|
Instance(DistanceQuery<?> distQ,
DBIDs ids,
WritableIntegerDataStore assignment)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected double |
assignToNearestCluster(ArrayDBIDs means)
Returns a list of clusters.
|
protected double |
computeReassignmentCost(DBIDRef h,
int mnum)
Compute the reassignment cost of one swap.
|
protected double |
run(ArrayModifiableDBIDs medoids,
int maxiter)
Run the PAM optimization phase.
|
DBIDs ids
DistanceQuery<?> distQ
WritableDoubleDataStore nearest
WritableDoubleDataStore second
WritableIntegerDataStore assignment
public Instance(DistanceQuery<?> distQ, DBIDs ids, WritableIntegerDataStore assignment)
distQ - Distance queryids - IDs to processassignment - Cluster assignmentprotected double run(ArrayModifiableDBIDs medoids, int maxiter)
medoids - Medoids listmaxiter - protected double computeReassignmentCost(DBIDRef h, int mnum)
h - Current object to swap with the medoidmnum - Medoid number to be replacedprotected double assignToNearestCluster(ArrayDBIDs means)
means - Object centroidsCopyright © 2019 ELKI Development Team. License information.