Skip to contents

Returns the count of terminal leaf nodes in a fitted cta_tree (an integer scalar, not a table). Returns NA_integer_ for no-tree fits (where tree$no_tree is TRUE).

Usage

cta_strata(tree)

Arguments

tree

A cta_tree from oda_cta_fit.

Value

Integer scalar: number of terminal leaf nodes, or NA_integer_ for no-tree fits. This is a count, not a data frame - use cta_endpoint_table for per-endpoint rows.

Details

To obtain endpoint details (node IDs, path labels, class counts, predicted class), use cta_endpoint_table.