scr_core: Variables that cross several targets

View source: R/select.R

scr_coreR Documentation

Variables that cross several targets

Description

Which variables were approved on how many targets. A stable core across targets is the best argument in favor of a variable.

Usage

scr_core(x, min_targets = 2L)

Arguments

x

An object from scr_run(), or a named list of scr_result.

min_targets

Minimum number of targets to enter the result.

Value

A data.table with feature, n_targets, targets and mean_rank.

See Also

Other portfolio: scr_compare(), scr_run(), scr_runset

Examples

cfg <- scr_config(verbose = FALSE, nthread = 1, use_ranger = FALSE,
                  xgb_rounds = 60, n_boot = 20)
r1 <- scr_select(scr_demo, "default", config = cfg, drop = c("id", "churn"),
                  date_col = "ref_date")
r2 <- scr_select(scr_demo, "churn", config = cfg, drop = c("id", "default"),
                 date_col = "ref_date")
scr_core(list(default = r1, churn = r2), min_targets = 2)

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