Plotting: .pl#
The ggml_ot.pl module provides a collection of functions to visualize distance matrices, embeddings, and classification results. These plotting functions are designed to work with ggml_ot datasets and outputs, offering options for dimensionality reduction, plotting techniques, and customization of the visualizations.
Displaying and saving plots#
Plots are displayed automatically in interactive environments such as Jupyter
notebooks and IPython. In scripts, pass show=True to display a plot.
Pass show=False to suppress immediate display and return the Matplotlib or
seaborn plot object. This lets you customize the plot and display it later with
plt.show().
To save a plot using its default filename in the directory configured by
ggml_ot.settings.figdir (see Settings: .settings), pass save=True. Provide
a different filename with save="my_plot.png".
Patient-level plots#
Plot a hierarchically-clustered heatmap with sample annotations. |
|
Plot a 2-D embedding of a precomputed distance matrix. |
|
Plot a clustermap, an embedding, or both side-by-side. |
Evaluation#
Display a DataFrame of evaluation metrics as a formatted table. |
|
Plot a confusion-matrix heatmap. |
|
Contour plot of grid-search results over two hyperparameters. |
Subspace / GMM#
2-D scatter plot of points in a subspace. |
|
3-D scatter plot. |
|
Draw GMM covariance ellipses onto an existing axes. |
|
Three-panel figure: mixed 3-D | rotated 2-D | clean 2-D (or learned). |
|
2-D scatter with optional GMM ellipse overlay. |
|
Multi-panel figure for a synthetic-GMM |