Class 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
    • Constructor Detail

      • SilhouettePlotProjector

        public SilhouettePlotProjector​(Clustering<?> clustering,
                                       DoubleRelation dds)
        Constructor.
        Parameters:
        clustering - clustering on which the silhouette values are calculated
        dds - silhouette values sorted by clusters
    • Method Detail

      • sortSilhouette

        private static DoubleDBIDList[] sortSilhouette​(Clustering<?> c,
                                                       DoubleRelation dds)
        Sort the silhouettes for visualization.
        Parameters:
        c - Clustering
        dds - 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 be null or empty string.
        Specified by:
        getMenuName in interface VisualizationItem
        Returns:
        Menu name.
      • arrange

        public java.util.Collection<PlotItem> arrange​(VisualizerContext context)
        Description copied from interface: Projector
        Produce an arrangement of projections.
        Specified by:
        arrange in interface Projector
        Parameters:
        context - Visualization context
        Returns:
        Arrangement.
      • 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