Package elki.clustering.kmedoids
Class SingleAssignmentKMedoids.Instance
- java.lang.Object
-
- elki.clustering.kmedoids.SingleAssignmentKMedoids.Instance
-
- Enclosing class:
- SingleAssignmentKMedoids<O>
protected static class SingleAssignmentKMedoids.Instance extends java.lang.Object
Instance for a single dataset.- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description (package private) WritableIntegerDataStore
assignment
Cluster mapping.(package private) DistanceQuery<?>
distQ
Distance function to use.(package private) DBIDs
ids
Ids to process.
-
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
assignToNearestCluster(ArrayModifiableDBIDs means)
Assign each object to the nearest cluster, return the cost.protected double
run(ArrayModifiableDBIDs medoids)
Run the PAM optimization phase.
-
-
-
Field Detail
-
ids
DBIDs ids
Ids to process.
-
distQ
DistanceQuery<?> distQ
Distance function to use.
-
assignment
WritableIntegerDataStore assignment
Cluster mapping.
-
-
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)
Run the PAM optimization phase.- Parameters:
medoids
- Medoids list- Returns:
- final cost
-
assignToNearestCluster
protected double assignToNearestCluster(ArrayModifiableDBIDs means)
Assign each object to the nearest cluster, return the cost.- Parameters:
means
- Object centroids- Returns:
- Assignment cost
-
-