scitex_ml.clustering

Scitex clustering module.

scitex_ml.clustering.main(data, labels, hues=None, hues_colors=None, axes=None, axes_titles=None, supervised=False, title='UMAP Clustering', alpha=1.0, s=3, use_independent_legend=False, add_super_imposed=False, umap_model=None)

Perform UMAP clustering and visualization.

Parameters:
  • data_all (list) – List of data arrays to cluster

  • labels_all (list) – List of label arrays corresponding to data_all

  • hues_all (list, optional) – List of hue arrays for coloring points

  • hues_colors_all (list, optional) – List of color mappings for hues

  • axes (matplotlib.axes.Axes, optional) – Existing axes to plot on

  • axes_titles (list, optional) – Titles for each subplot

  • supervised (bool, optional) – Whether to use supervised UMAP

  • title (str, optional) – Main title for the plot

  • alpha (float, optional) – Transparency of points

  • s (int, optional) – Size of points

  • use_independent_legend (bool, optional) – Whether to create separate legend figures

  • add_super_imposed (bool, optional) – Whether to add a superimposed plot

  • umap_model (umap.UMAP, optional) – Pre-fitted UMAP model

Returns:

Figure, legend figures (if applicable), and UMAP model

Return type:

tuple

scitex_ml.clustering.pca(data_all, labels_all, axes_titles=None, title='PCA Clustering', alpha=0.1, s=3, use_independent_legend=False, add_super_imposed=False, palette='viridis')[source]
scitex_ml.clustering.umap(data, labels, hues=None, hues_colors=None, axes=None, axes_titles=None, supervised=False, title='UMAP Clustering', alpha=1.0, s=3, use_independent_legend=False, add_super_imposed=False, umap_model=None)[source]

Perform UMAP clustering and visualization.

Parameters:
  • data_all (list) – List of data arrays to cluster

  • labels_all (list) – List of label arrays corresponding to data_all

  • hues_all (list, optional) – List of hue arrays for coloring points

  • hues_colors_all (list, optional) – List of color mappings for hues

  • axes (matplotlib.axes.Axes, optional) – Existing axes to plot on

  • axes_titles (list, optional) – Titles for each subplot

  • supervised (bool, optional) – Whether to use supervised UMAP

  • title (str, optional) – Main title for the plot

  • alpha (float, optional) – Transparency of points

  • s (int, optional) – Size of points

  • use_independent_legend (bool, optional) – Whether to create separate legend figures

  • add_super_imposed (bool, optional) – Whether to add a superimposed plot

  • umap_model (umap.UMAP, optional) – Pre-fitted UMAP model

Returns:

Figure, legend figures (if applicable), and UMAP model

Return type:

tuple