Package elki.clustering.silhouette
Class PAMMEDSIL.Instance
- java.lang.Object
-
- elki.clustering.silhouette.PAMSIL.Instance
-
- elki.clustering.silhouette.PAMMEDSIL.Instance
-
protected static class PAMMEDSIL.Instance extends PAMSIL.Instance
Instance for a single dataset.- Author:
- Erich Schubert
-
-
Field Summary
-
Fields inherited from class elki.clustering.silhouette.PAMSIL.Instance
assignment, distQ, ids, scratch, silhouettes
-
-
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
medoidsilhouette(IntegerDataStore assignment, DBIDArrayIter m)
Evaluate the average medoid Silhouette of the current cluster assignmentprotected double
medoidsilhouette(IntegerDataStore assignment, DBIDArrayIter m, int hoff, DBIDRef h)
Evaluate the average medoid Silhouette of the current cluster assignmentprotected double
run(ArrayModifiableDBIDs medoids, int maxiter)
Run the PAMMEDSIL optimization phase.-
Methods inherited from class elki.clustering.silhouette.PAMSIL.Instance
assignToNearestCluster, reassignToNearestCluster, silhouette, silhouetteScores
-
-
-
-
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 PAMMEDSIL optimization phase.- Overrides:
run
in classPAMSIL.Instance
- Parameters:
medoids
- Initial medoids listmaxiter
- Maximum number of iterations- Returns:
- final medoid Silhouette
-
medoidsilhouette
protected double medoidsilhouette(IntegerDataStore assignment, DBIDArrayIter m)
Evaluate the average medoid Silhouette of the current cluster assignment- Parameters:
assignment
- cluster assignmentm
- medoid iterator- Returns:
- Average silhouette width
-
medoidsilhouette
protected double medoidsilhouette(IntegerDataStore assignment, DBIDArrayIter m, int hoff, DBIDRef h)
Evaluate the average medoid Silhouette of the current cluster assignment- Parameters:
assignment
- cluster assignmentm
- medoid iteratorhoff
- replacement offseth
- replacement medoid- Returns:
- Average silhouette width
-
-