slct_psi_then_error: PSI then error selector

View source: R/slct_psi_then_error.R

slct_psi_then_errorR Documentation

PSI then error selector

Description

Combines slct_psi() and slct_error_metrics(): among the concepts accepted by the PSI stage, in increasing order of PSI, selects the first one that also passes the error stage. No concept passing both: a new one is created.

Usage

slct_psi_then_error(
  max_psi = NULL,
  tolerance = NULL,
  tol_quantile = 0.8,
  numerical_cols = NULL,
  n_tiles = 10,
  th = NULL,
  metric = mt_accuracy(),
  init_blocks = FALSE,
  pick = c("first", "min_error")
)

Arguments

max_psi

Fixed PSI limit. NULL (default): learned (see slct_psi()).

tolerance

Fixed error tolerance. NULL (default): learned (see slct_error_metrics()).

tol_quantile

Quantile of both learned limits, PSI and error.

numerical_cols

Names of the numerical features (see slct_psi()).

n_tiles

Number of quantile bins of the numerical PSI.

th

Classification threshold. NULL (default): the threshold of each concept.

metric

Metric object (e.g. mt_accuracy()).

init_blocks

Start the error history by blocks (see slct_error_metrics()). FALSE (default): only the PSI stage starts by blocks.

pick

Among the concepts accepted by the PSI stage: "first" (default) selects the first one, in increasing order of PSI, that also passes the error stage; "min_error" (used in the experiments) selects, among those passing both stages, the one with the smallest error on the batch (ties: the smallest PSI).

Value

A slct_psi_then_error object.


heimdall documentation built on Dec. 2, 2026, 5:08 p.m.