Plot the full local CTA models along a LORT recursion path
Source:R/graphics_v3.R
plot_lort_path.RdReturns a named list of ggplot objects, one per LORT node on the path from
the root to the requested index. Each panel shows the full
local CTA model embedded at that LORT node – not a stump summary.
Usage
plot_lort_path(
x,
index = 1L,
layout = c("multipanel", "list"),
ncol = 1L,
target_class = 1L,
color_by = c("none", "target_rate", "prediction"),
label_detail = c("simple", "full"),
show_node_ess = FALSE,
show_p = TRUE,
show_loo = TRUE,
show_rule = TRUE,
show_metrics = FALSE,
short_edge_labels = TRUE,
node_text_size = 3.5,
edge_text_size = 3.2,
palette = NULL,
...
)Arguments
- x
A
cta_ortobject fromlort_fit.- index
Integer; target LORT node index (end of path).
- layout
Character;
"multipanel"(default) returns a single arranged figure with one panel per path node – requires the patchwork package."list"returns the current named list of ggplot objects.- ncol
Integer; number of columns in the multipanel layout. Default
1L(vertical stack).- target_class
Integer; target class for node coloring. Default
1L.- color_by
Character; leaf fill mode. Default
"none".- label_detail
Character;
"simple"(default) or"full".- show_node_ess
Logical. Default
FALSE.- show_p
Logical; append
MC p = X.XXXto split-node labels. DefaultTRUE.- show_loo
Logical; append LOO status/p to split-node labels. Default
TRUE.- show_rule
Logical. Default
TRUE.- show_metrics
Logical. Default
FALSE.- short_edge_labels
Logical. Default
TRUE.- node_text_size
Numeric. Default
3.5.- edge_text_size
Numeric. Default
3.2.- palette
Named list; color overrides.
- ...
Ignored; reserved.
Value
With layout = "multipanel": a single patchwork/ggplot
object containing all path panels. With layout = "list": a named
list of ggplot objects.
Details
The list is named index_1, index_2, etc. (one name per LORT
node on the path). Terminal nodes with no model get a message panel.