early_stop_decision: Early Stopping Decision

View source: R/subgroup_consistency_helpers.R

early_stop_decisionR Documentation

Early Stopping Decision

Description

Evaluates whether enough evidence exists to stop early based on confidence interval for consistency proportion.

Usage

early_stop_decision(
  n_success,
  n_total,
  threshold,
  conf.level = 0.95,
  min_samples = 20
)

Arguments

n_success

Integer. Number of splits meeting consistency.

n_total

Integer. Total number of valid splits.

threshold

Numeric. Target consistency threshold.

conf.level

Numeric. Confidence level for decision (default 0.95).

min_samples

Integer. Minimum samples before allowing early stop.

Value

Character. One of "continue", "pass", or "fail".

Examples

early_stop_decision(95, 100, threshold = 0.90)
early_stop_decision(60, 100, threshold = 0.90)
early_stop_decision(10, 15, threshold = 0.90)  # below min_samples

forestsearch documentation built on Nov. 15, 2026, 9:06 a.m.