Package elki.visualization.projector
Class SilhouettePlotProjector
- java.lang.Object
-
- elki.visualization.projector.SilhouettePlotProjector
-
- All Implemented Interfaces:
Projector
,VisualizationItem
public class SilhouettePlotProjector extends java.lang.Object implements Projector
Projection for Silhouette plots.- Since:
- 0.8.0
- Author:
- Robert Gehde
-
-
Field Summary
Fields Modifier and Type Field Description private Clustering<?>
clustering
Underlying clusteringprivate SilhouettePlot
plot
Silhouette plot imageprivate DoubleDBIDList[]
values
Silhouette values
-
Constructor Summary
Constructors Constructor Description SilhouettePlotProjector(Clustering<?> clustering, DoubleRelation dds)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<PlotItem>
arrange(VisualizerContext context)
Produce an arrangement of projections.java.lang.String
getMenuName()
Name to display in the menu.Clustering<?>
getResult()
Get the underlying ClusteringSilhouettePlot
getSilhouettePlot(VisualizerContext context)
Get or produce the actual Silhouette plot.DoubleDBIDList[]
getValues()
Get the silhouette valuesprivate static DoubleDBIDList[]
sortSilhouette(Clustering<?> c, DoubleRelation dds)
Sort the silhouettes for visualization.
-
-
-
Field Detail
-
clustering
private Clustering<?> clustering
Underlying clustering
-
plot
private SilhouettePlot plot
Silhouette plot image
-
values
private DoubleDBIDList[] values
Silhouette values
-
-
Constructor Detail
-
SilhouettePlotProjector
public SilhouettePlotProjector(Clustering<?> clustering, DoubleRelation dds)
Constructor.- Parameters:
clustering
- clustering on which the silhouette values are calculateddds
- silhouette values sorted by clusters
-
-
Method Detail
-
sortSilhouette
private static DoubleDBIDList[] sortSilhouette(Clustering<?> c, DoubleRelation dds)
Sort the silhouettes for visualization.- Parameters:
c
- Clusteringdds
- Silhouette values- Returns:
- Sorted silhouette per cluster
-
getMenuName
public java.lang.String getMenuName()
Description copied from interface:VisualizationItem
Name to display in the menu. May benull
or empty string.- Specified by:
getMenuName
in interfaceVisualizationItem
- Returns:
- Menu name.
-
arrange
public java.util.Collection<PlotItem> arrange(VisualizerContext context)
Description copied from interface:Projector
Produce an arrangement of projections.
-
getSilhouettePlot
public SilhouettePlot getSilhouettePlot(VisualizerContext context)
Get or produce the actual Silhouette plot.- Parameters:
context
- Context to use- Returns:
- Plot
-
getResult
public Clustering<?> getResult()
Get the underlying Clustering- Returns:
- the clustering
-
getValues
public DoubleDBIDList[] getValues()
Get the silhouette values- Returns:
- the silhouette values
-
-