Node-level summary table for a fitted LORT (legacy name: cta_ort)
cta_ort_node_table.RdReturns one row per LORT node from a cta_ort (LORT) object. Each row
exposes the embedded CTA member selected at that node (MINDENOM, ESS, D,
root attribute, split/leaf counts, endpoint count) plus the LORT method
taxonomy metadata (method, selection_scope,
global_optimization, sda_anchored).
Terminal nodes have NA for all selected-model columns. Non-terminal
nodes have NA for stop_reason and non-empty child_ids.
Naming note: The function name cta_ort_node_table and the class
cta_ort are legacy compatibility names for the implemented LORT method.
They are retained for backward compatibility; new code and documentation should
refer to the method as LORT.
Arguments
- object
A
cta_ortfromcta_fit(..., recursive = TRUE).
Value
A data.frame with one row per ORT node and columns:
ort_node_idInteger ORT node identifier.
parent_ort_node_idInteger parent ORT node id;
NAfor root.depthInteger recursion depth (root = 0).
nInteger observations at this ORT node.
class_countsCharacter; named class counts, e.g.
"0=60, 1=40".terminalLogical;
TRUEfor terminal leaf ORT nodes.stop_reasonCharacter stop reason for terminal nodes;
NAfor non-terminal.selected_mindenomInteger MINDENOM of the embedded CTA member.
selected_essNumeric ESS of the embedded CTA member (%).
selected_dNumeric D-statistic of the embedded CTA member.
selected_root_attributeCharacter root attribute of the embedded CTA member.
selected_tree_nodesInteger split-node count in the embedded CTA member.
selected_tree_leavesInteger leaf count in the embedded CTA member.
selected_endpoint_countInteger endpoint (terminal leaf) count of the embedded CTA member; equals number of ORT child nodes.
child_idsCharacter comma-separated child ORT node ids; empty string for terminal nodes.
methodCharacter; always
"lort"for current fits.selection_scopeCharacter; always
"local_node"for LORT.global_optimizationLogical; always
FALSEfor LORT.sda_anchoredLogical; always
FALSEfor LORT.
Examples
X <- data.frame(A = c(rep(0L, 20), rep(1L, 20), rep(1L, 20)),
B = c(rep(0L, 20), rep(0L, 20), rep(1L, 20)))
y <- c(rep(0L, 20), rep(0L, 20), rep(1L, 20))
ort <- cta_fit(X, y, recursive = TRUE, mc_iter = 100L, mc_seed = 42L,
loo = "off", min_n = 5L)
cta_ort_node_table(ort)
#> ort_node_id parent_ort_node_id depth n class_counts terminal stop_reason
#> 1 1 NA 0 60 0=40, 1=20 FALSE <NA>
#> 2 2 1 1 20 1=20 TRUE no_tree
#> 3 3 1 1 20 0=20 TRUE no_tree
#> 4 4 1 1 20 0=20 TRUE no_tree
#> selected_mindenom selected_ess selected_d selected_root_attribute
#> 1 1 100 0 A
#> 2 NA NA NA <NA>
#> 3 NA NA NA <NA>
#> 4 NA NA NA <NA>
#> selected_tree_nodes selected_tree_leaves selected_endpoint_count child_ids
#> 1 4 3 3 4,3,2
#> 2 NA NA NA
#> 3 NA NA NA
#> 4 NA NA NA
#> method selection_scope global_optimization sda_anchored
#> 1 lort local_node FALSE FALSE
#> 2 lort local_node FALSE FALSE
#> 3 lort local_node FALSE FALSE
#> 4 lort local_node FALSE FALSE