From Raw Model Outputs to Publication-Ready Evaluation Charts, in One Call

ROC curve — binary classifier

If you've ever trained a classifier, you know the ritual that follows: pull in matplotlib or a plotting library, wire up an ROC curve, compute AUC by hand or via sklearn, format a confusion matrix, maybe build a calibration plot if you're being careful — and then do it all over again next sprint when the chart needs to live in a report, a dashboard, and a notebook, each with its own plotting stack.

CanvasXpress now collapses that ritual into a single step. A new family of model-evaluation plot builders takes your model's raw outputs — true labels, scores, predicted classes, feature importances, SHAP values — and returns a ready-to-render chart specification. No external statistics library, no hand-rolled AUC computation, no redundant plotting code across languages. The same figure renders identically whether you're working in JavaScript, R, Python, a notebook, or a live dashboard.

What it covers

The builders span the evaluation workflow end to end:

Notably, none of this required inventing new chart types. Under the hood, each builder maps onto chart types CanvasXpress already renders well: ROC, PR, and calibration curves are Scatter2D line plots with reference-line decorations; the confusion matrix is a Heatmap with per-cell text; importance is a horizontal Bar chart; learning curves are multi-series Line charts; and the SHAP beeswarm is a Dotplot using jitter, grouping, and continuous color mapping on sample annotations. That matters for you as a user — it means these evaluation charts inherit everything CanvasXpress's chart engine already supports: zooming, theming, export, tooltips, and the full configuration surface you're used to.

Why this matters

The statistics live in the chart, not in your script. AUC, average precision, confusion counts, ECE, and mean absolute SHAP values are computed by the builder itself. You hand it arrays of truth and prediction data; it hands back a {data, config} pair. You're no longer responsible for keeping your plotting code and your metric computation in sync — they're the same step.

One figure, every language. The builders exist as JavaScript statics, with matching R and Python wrappers that take a data frame as the natural entry point. A data scientist prototyping in a Python notebook and an engineer embedding the chart in a production dashboard are generating the exact same visual, from the exact same logic, without reimplementing anything.

Framework-agnostic by design. These builders intentionally take plain arrays or data frames of scores and labels — not a fitted model object. That means they work regardless of whether your model came from scikit-learn, PyTorch, R's caret, XGBoost, or something homegrown. If your pipeline can produce truth labels, scores, or SHAP values as arrays, it can produce a CanvasXpress evaluation chart.

Using it in practice

Once a builder has produced its data and config, rendering it follows the same pattern as any other CanvasXpress chart. For example, after generating a ROC specification from your labels and scores (via the rocConfig builder available on the CanvasXpress object, or its R/Python equivalents), you render it exactly the way you'd render any chart:

var cx = new CanvasXpress("rocChart", data, config);

Because the output is a standard {data, config} pair, every downstream CanvasXpress capability applies immediately. You can push updated scores into a live chart as new model runs complete:

cx.updateData(data, true);

Or adjust presentation — colors, titles, axis labels — without touching the underlying statistics:

cx.updateConfig(config, true);

Need to resize the chart to fit a report layout or dashboard panel? That's a single call too:

cx.setDimensions(width, height);

And if you want to inspect exactly what configuration a given evaluation chart resolved to — useful when you're tuning decorations or comparing runs — cx.getConfig() hands you the live object.

Shareable and reproducible out of the box

Because these charts are ordinary CanvasXpress charts under the hood, they come with the toolbar features you already rely on. You can save any evaluation plot as JSON directly from the chart's File menu, hand that file to a colleague, and have them drop it onto their own chart container to reload it pixel-for-pixel — no need to re-run your training pipeline or re-send raw prediction arrays. The toolbar's Reproduce action goes a step further, replaying the chart's construction so a teammate can see exactly how the figure was built, which is especially valuable when a model evaluation chart needs to survive a code review or an audit trail.

A figure layer, not a monitoring platform

It's worth being clear about scope: this is a plotting and reporting layer, not a training-loop monitor. If you need live, epoch-by-epoch streaming of loss curves during training, that's the job of tools purpose-built for experiment tracking. What CanvasXpress's evaluation builders give you instead is the final, polished, statistically-correct figure — the ROC curve for your model card, the confusion matrix for your stakeholder deck, the SHAP beeswarm for your model documentation — generated consistently, in whatever language your workflow already uses.

For teams juggling JavaScript dashboards, R analysis scripts, and Python notebooks, that consistency is the real win: one set of evaluation charts, one computation of the underlying statistics, rendered everywhere the same way.