Runs a configurable set of diagnostic and feature-analysis plots for each
requested dataset split and writes the results to structured HTML files
inside a directory named after @model_display_name.
Arguments
- mb
A
modelblueprintobject.- sets
[character]Dataset splits to process. Defaultc("train", "test", "holdout"). NULL splits are silently skipped.- plots
[character]Plot types to produce. Any combination of"validation","oneway","pdp","stability","shap".- validation_bins
[integer(1)]Bins for the pred-vs-obs calibration chart. Default10L.- one_way_bins
[integer(1)]Bins for one-way charts. Default10L.- pdp_bins
[integer(1)]Bins for PDP charts. Default10L.- split
[character(1)]Column name to segment one-way plots by.NA(default) produces unsplit charts.- filepath
[character(1)]Parent directory for all output. Defaults togetwd(). A subdirectory named@model_display_nameis created inside.- selfcontained
[logical(1)]Passed tosave_plots().TRUE(default) embeds all dependencies into each HTML file. Set toFALSEfor faster saves during development.- seed
[integer(1)]Seed for the random 50/50 split used by the"stability"plots, applied viawithr::with_seed()so the result is reproducible without disturbing the global RNG stream. Default1L.
Details
Output layout
<filepath>/
<model_display_name>/
<name>.tar.gz
validation/
<name>_<set>_validation_plots.html
oneway/
<name>_<set>_oneway_plots.html
<name>_<set>_stability_plots.html # if "stability" requested
pdp/
<name>_<set>_pdp_plots.html
shap/
<name>_<set>_shap_plots.htmlWith selfcontained = FALSE, the HTML files in each subdirectory share a
single lib/ dependency folder instead of one folder per file.
Validation plots include a gain chart, predicted-vs-observed calibration chart, and grouped residuals — one HTML file per split.
One-way plots cover every feature in @x_original_inputs. If split
is supplied the column is passed to one_way(); otherwise charts are
unsplit.
Stability plots are one-way charts split by a random 50/50 variable
("A" / "B"). If the two lines overlap closely the patterns are stable
and not driven by random noise.
PDP plots cover every feature in @x_original_inputs.
SHAP plots use shap() with type = "importance". The modelblueprint
must have @x_original_inputs set and the model must support kernel SHAP.
The modelblueprint itself is serialised via savemb() into the root
output directory.