scr_funnel: Audit funnel: every input variable and its fate

View source: R/accessors.R

scr_funnelR Documentation

Audit funnel: every input variable and its fate

Description

The central deliverable. One row per input column, plus one per derived variable, with the descriptive profile, the verdict of every gate, the votes of every model and exit_stage, the exact stage at which the variable failed. No candidate disappears from the report.

Usage

scr_funnel(x, only_selected = FALSE, cols = "essentials")

Arguments

x

An object from scr_select().

only_selected

If TRUE, returns only the approved ones.

cols

"essentials" (default) gives a lean view; "all" gives everything; or pass a vector of names.

Value

A data.table ordered with the approved first.

Values of exit_stage

⁠00.config⁠

Never competed: it was in drop.

⁠01.triage⁠

Constant, near-constant, high cardinality, exact duplicate, missing share above the ceiling, or no signal in the coarse IV.

⁠02.binning⁠

The binning algorithm failed on this column.

⁠03.screening⁠

Failed one of the eight admission rules.

⁠04.holdout⁠

IV dropped out of sample, unstable PSI, or part of the hold-out falls in no bin.

⁠05.correlation⁠

Redundant with a better-ranked variable.

⁠05b.derived_excluded⁠

Passed everything, but is a column the pipeline created and allow_derived_final = FALSE.

⁠06.consensus⁠

Not enough votes, or outside the top-N.

⁠07.approved⁠

Entered the shortlist.

⁠08.manual_drop⁠

In the automatic consensus, but removed by the analyst in the coarse classing lab (scr_classing_choose()).

See Also

Other accessors: scr_gains(), scr_leakage(), scr_result, scr_score_gains(), scr_score_metrics(), scr_selected()

Examples

cfg <- scr_config(verbose = FALSE, nthread = 1, use_ranger = FALSE,
                  xgb_rounds = 60, n_boot = 20)
res <- scr_select(scr_demo, "default", config = cfg, drop = "id",
                  date_col = "ref_date")
head(scr_funnel(res, only_selected = TRUE))
table(scr_funnel(res, cols = "all")$exit_stage)

scorecraft documentation built on Dec. 6, 2026, 1:09 a.m.