fit_gazepoint_calibrator: Fit a probability calibrator

View source: R/calibration-assessment.R

fit_gazepoint_calibratorR Documentation

Fit a probability calibrator

Description

Fit a probability calibrator

Usage

fit_gazepoint_calibrator(
  truth,
  probability,
  positive = NULL,
  method = c("platt", "isotonic")
)

Arguments

truth

Observed binary outcome values.

probability

Uncalibrated positive-class probabilities.

positive

Label representing the positive class.

method

Calibration method: Platt scaling or isotonic regression.

Value

A fitted gp3ml_calibrator object containing the calibration method, fitted model, and outcome labels.

Examples

truth <- factor(
  rep(c("pass", "review"), 6),
  levels = c("pass", "review")
)
probability <- c(
  0.20, 0.70, 0.60, 0.55, 0.30, 0.80,
  0.65, 0.45, 0.40, 0.75, 0.50, 0.60
)
calibrator <- fit_gazepoint_calibrator(
  truth = truth,
  probability = probability,
  positive = "review",
  method = "platt"
)
calibrator

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