inst/doc/decision-governance.R

## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
library(gp3ml)

## -----------------------------------------------------------------------------
truth <- factor(rep(c("pass", "review"), 20), levels = c("pass", "review"))
probability <- seq(0.05, 0.95, length.out = 40)

evaluation <- evaluate_gazepoint_thresholds(
  truth = truth,
  probability = probability,
  positive = "review",
  thresholds = seq(0.2, 0.8, by = 0.05)
)

rule <- select_gazepoint_threshold(
  evaluation,
  metric = "balanced_accuracy",
  direction = "maximize",
  generalization_target = "new_participants",
  scientific_justification =
    "Balance sensitivity and specificity for predefined recording-quality review status."
)

validate_gazepoint_decision_rule(rule, require_threshold = TRUE)
plot(evaluation)

Try the gp3ml package in your browser

Any scripts or data that you put into this service are public.

gp3ml documentation built on Aug. 23, 2026, 5:11 p.m.