Plot Command - Visualize model behaviour and experiment comparisons.
Functions
tuiml plot [OPTIONS]
Generate a plot for model or experiment analysis.
Renders the requested chart and returns it as an inline image. What each plot needs differs: confusion_matrix, roc_curve and pr_curve want a trained model plus a labelled dataset; tree and feature_importance read the model alone; learning_curve retrains an --algorithm over growing subsets; and the comparison plots (cd_diagram, boxplot_comparison, heatmap, ranking_table) work purely from the cross-validation scores passed to --benchmark-results.
Chart which features a trained model relies on:
bash
$ tuiml plot --plot-type feature_importance --model-id m1
Score a model on held-out data and plot its confusion matrix:
bash
$ tuiml plot --plot-type confusion_matrix --model-id m1 --data d.csv --target y
Compare algorithms from cross-validation scores:
bash
$ tuiml plot --plot-type cd_diagram --benchmark-results "$SCORES"
Options
--plot-type
str required
Plot to generate. Scored against a dataset: 'confusion_matrix', 'roc_curve', 'pr_curve', 'learning_curve'. From the model alone: 'tree', 'feature_importance'. From experiment results: 'cd_diagram', 'boxplot_comparison', 'heatmap', 'ranking_table'
--model-id
str
Model ID returned by tuiml train (required for most plot types)
--model-path
str
Path to a saved model file (alternative to --model-id)
--data
str
Data file path or built-in dataset name (required for confusion_matrix, roc_curve, pr_curve, learning_curve)
--target
str
Target column name (required for confusion_matrix, roc_curve, pr_curve, learning_curve)
--algorithm
str
Algorithm class name (required for learning_curve)
--title
str
Custom plot title; a sensible one is chosen if omitted
--normalize/--no-normalize
= False
Show the confusion matrix as percentages rather than counts (confusion_matrix only)
--benchmark-results
str
Cross-validation scores for the comparison plots, as a JSON object mapping each algorithm name to its list of fold scores
--json-output
flag
Output raw JSON