ClusterPlot#

class skfda.exploratory.visualization.clustering.ClusterPlot(estimator, fdata, chart=None, fig=None, axes=None, n_rows=None, n_cols=None, sample_labels=None, cluster_colors=None, cluster_labels=None, center_colors=None, center_labels=None, center_width=3, colormap=None)[source]#

ClusterPlot class.

Parameters:
  • estimator (ClusteringEstimator) – estimator used to calculate the clusters.

  • X – contains the samples which are grouped into different clusters.

  • fig (Figure | None) – figure over which the graphs are plotted in case ax is not specified. If None and ax is also None, the figure is initialized.

  • axes (Axes | Sequence[Axes] | None) – axis over where the graphs are plotted. If None, see param fig.

  • n_rows (int | None) – designates the number of rows of the figure to plot the different dimensions of the image. Only specified if fig and ax are None.

  • n_cols (int | None) – designates the number of columns of the figure to plot the different dimensions of the image. Only specified if fig and ax are None.

  • sample_labels (Sequence[str] | None) – contains in order the labels of each

  • fdatagrid. (sample of the) –

  • cluster_colors (Sequence[ColorLike] | None) – contains in order the colors of each cluster the samples of the fdatagrid are classified into.

  • cluster_labels (Sequence[str] | None) – contains in order the names of each cluster the samples of the fdatagrid are classified into.

  • center_colors (Sequence[ColorLike] | None) – contains in order the colors of each centroid of the clusters the samples of the fdatagrid are classified into.

  • center_labels (Sequence[str] | None) – contains in order the labels of each centroid of the clusters the samples of the fdatagrid are classified into.

  • center_width (int) – width of the centroid curves.

  • colormap (matplotlib.colors.Colormap) – colormap from which the colors of the plot are taken. Defaults to rainbow.

  • fdata (FDataGrid) –

  • chart (Figure | Axes | None) –

Methods

hover(event)

Activate the annotation when hovering a point.

plot()

Plot the object and its data.

hover(event)[source]#

Activate the annotation when hovering a point.

Callback method that activates the annotation when hovering a specific point in a graph. The annotation is a description of the point containing its coordinates.

Parameters:

event (MouseEvent) – event object containing the artist of the point hovered.

Return type:

None

plot()[source]#

Plot the object and its data.

Returns:

figure object in which the displays and

widgets will be plotted.

Return type:

Figure

Examples using skfda.exploratory.visualization.clustering.ClusterPlot#

Clustering

Clustering