scr_triage: Stage 1: descriptive triage and sentinel resolution

View source: R/triage.R

scr_triageR Documentation

Stage 1: descriptive triage and sentinel resolution

Description

Profiles every candidate on the training rows only, decides its fate and materializes the clean data for train and hold-out with the same values (training median, "MISSING" level). A sentinel or missing mass with weight (special_min_share) and signal (special_min_woe) becomes a categorical flag ⁠<column><flag_suffix>⁠, which the engine bins and emits in SQL natively.

Usage

scr_triage(split, config = scr_config())

Arguments

split

An object from scr_split().

config

An object from scr_config().

Details

Failures at this stage: CONSTANT, NEAR_CONSTANT, TOO_MANY_MISSING, HIGH_CARDINALITY, NO_SIGNAL (coarse IV below min_iv_quick) and ⁠DUPLICATE_OF:<column>⁠. A failed numeric whose special-population flag survives carries the suffix ⁠;RESCUED_AS_FLAG⁠.

Value

An scr_triage object with profile (one row per candidate and derived flag), ledger (the source of truth of the pre-processing the SQL reproduces), keep, derived, clean (target + survivors + flags, with no NA) and the originating split.

See Also

Other stages: scr_align(), scr_bin(), scr_cutoff(), scr_model(), scr_reject(), scr_scorecard(), scr_select(), scr_split(), scr_strategy()

Examples

sp <- scr_split(scr_demo, "default", date_col = "ref_date", drop = "id")
tr <- scr_triage(sp, scr_config(verbose = FALSE))
tr
table(tr$profile$triage_reason)

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