Class Silhouette<O>
- java.lang.Object
-
- elki.evaluation.clustering.internal.Silhouette<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
Evaluator
,ResultProcessor
@Reference(authors="P. J. Rousseeuw", title="Silhouettes: A graphical aid to the interpretation and validation of cluster analysis", booktitle="Journal of Computational and Applied Mathematics, Volume 20", url="https://doi.org/10.1016/0377-0427(87)90125-7", bibkey="doi:10.1016/0377-04278790125-7") public class Silhouette<O> extends java.lang.Object implements Evaluator
Compute the silhouette of a data set.Reference:
P. J. Rousseeuw
Silhouettes: A graphical aid to the interpretation and validation of cluster analysis
In: Journal of Computational and Applied Mathematics Volume 20, November 1987TODO: keep all silhouette values, and allow visualization!
- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Silhouette.Par<O>
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description private Distance<? super O>
distance
Distance function to use.private static java.lang.String
key
Key for logging statistics.private static Logging
LOG
Logger for debug output.private NoiseHandling
noiseOption
Option for noise handling.private boolean
penalize
Penalize noise, ifNoiseHandling.IGNORE_NOISE
is set.static java.lang.String
SILHOUETTE_NAME
Name of the silhouette result.
-
Constructor Summary
Constructors Constructor Description Silhouette(Distance<? super O> distance, boolean mergenoise)
Constructor.Silhouette(Distance<? super O> distance, NoiseHandling noiseOption, boolean penalize)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
evaluateClustering(Relation<O> rel, DistanceQuery<O> dq, Clustering<?> c)
Evaluate a single clustering.void
processNewResult(java.lang.Object result)
Process a result.
-
-
-
Field Detail
-
LOG
private static final Logging LOG
Logger for debug output.
-
SILHOUETTE_NAME
public static final java.lang.String SILHOUETTE_NAME
Name of the silhouette result.- See Also:
- Constant Field Values
-
noiseOption
private NoiseHandling noiseOption
Option for noise handling.
-
penalize
private boolean penalize
Penalize noise, ifNoiseHandling.IGNORE_NOISE
is set.
-
key
private static final java.lang.String key
Key for logging statistics.
-
-
Constructor Detail
-
Silhouette
public Silhouette(Distance<? super O> distance, NoiseHandling noiseOption, boolean penalize)
Constructor.- Parameters:
distance
- Distance functionnoiseOption
- Handling of "noise" clusters.penalize
- noise, ifNoiseHandling.IGNORE_NOISE
is set.
-
-
Method Detail
-
evaluateClustering
public double evaluateClustering(Relation<O> rel, DistanceQuery<O> dq, Clustering<?> c)
Evaluate a single clustering.- Parameters:
rel
- Data relationdq
- Distance queryc
- Clustering- Returns:
- Average silhouette
-
processNewResult
public void processNewResult(java.lang.Object result)
Description copied from interface:ResultProcessor
Process a result.- Specified by:
processNewResult
in interfaceResultProcessor
- Parameters:
result
- Newly added result subtree.
-
-