Visualizations.

Functions

Func

execute_plot

Line 11
execute_plot(**kwargs) -> Dict[str, Any]

Generate a visualization and return it as a saved PNG plus base64.

Backs the tuiml_plot tool. Supported plot types: confusion_matrix, roc_curve, pr_curve, learning_curve, tree, feature_importance, cd_diagram, boxplot_comparison, heatmap, ranking_table.

Parameters

plot_type
str
Which plot to produce (arrives via **kwargs, like all parameters below).
title
str = None
Custom plot title; each plot type has a sensible default.
model_id
str = None
Trained model to plot from (model-based plot types).
model_path
str = None
Explicit path to a serialized model file.
data
str = None
Dataset to evaluate/plot against (dataset_id, path, or built-in name); required by data-driven plot types.
normalize
bool = False
Normalize counts in the confusion matrix.
algorithm
str = None
Algorithm name; required for learning_curve.
benchmark_results
dict = None
{algorithm_name: [scores...]} mapping; required for the comparison plots (cd_diagram, boxplot_comparison, heatmap, ranking_table).

Returns

result
dict
On success: status ('success'), plot_type, description, path (saved PNG on disk), _image_base64 and _image_mime. On failure: status ('error'), error and optionally error_type / suggestion.