tropea_clustering.plot.plot_sankey¶
- tropea_clustering.plot.plot_sankey(title, labels, n_particles, tmp_frame_list)[source]¶
Plots the Sankey diagram at the desired frames.
Warning
This function requires the python package Kaleido, and uses plotly instead of matplotlib.pyplot. For this reason is deprecated and not supported since tropea-clustering 2.0.0.
- Parameters:
title (str) – The path of the .png file the figure will be saved as.
labels (ndarray of shape (n_particles * n_seq,)) – The output of the clustering algorithm.
n_particles (int) – The number of particles in the original dataset.
tmp_frame_list (List[int]) – The list of frames at which we want to plot the Sankey.
frames (For each of the selected)
proportional (the colored bars width is)
to (to each cluster population. The gray bands' witdh are proportional)
the (the number of data points moving from one cluster to the other between)
data. (selected frames. State "-1" refers to the unclassified)