% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calibration-assessment.R
\name{fit_gazepoint_calibrator}
\alias{fit_gazepoint_calibrator}
\title{Fit a probability calibrator}
\usage{
fit_gazepoint_calibrator(
  truth,
  probability,
  positive = NULL,
  method = c("platt", "isotonic")
)
}
\arguments{
\item{truth}{Observed binary outcome values.}

\item{probability}{Uncalibrated positive-class probabilities.}

\item{positive}{Label representing the positive class.}

\item{method}{Calibration method: Platt scaling or isotonic regression.}
}
\value{
A fitted \code{gp3ml_calibrator} object containing the calibration method, fitted model, and outcome labels.
}
\description{
Fit a probability calibrator
}
\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
}
