% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classes.R
\name{show,LeakAudit-method}
\alias{show,LeakAudit-method}
\title{Display summary for LeakAudit objects}
\usage{
\S4method{show}{LeakAudit}(object)
}
\arguments{
\item{object}{A \code{LeakAudit} object.}
}
\value{
No return value, called for side effects (prints a brief summary
  to the console). Returns \code{object} invisibly.
}
\description{
Prints a brief one-screen summary of a LeakAudit, including
  task and outcome, the permutation-gap statistic, and counts of
  batch-association rows, target-leakage features, and duplicate pairs.
  Use \code{summary()} for the full diagnostic report.
}
\examples{
set.seed(1)
df <- data.frame(
  subject = rep(1:6, each = 2),
  outcome = rbinom(12, 1, 0.5),
  x1 = rnorm(12),
  x2 = rnorm(12)
)
splits <- make_split_plan(df, outcome = "outcome",
                      mode = "subject_grouped", group = "subject", v = 3,
                      progress = FALSE)
custom <- list(
  glm = list(
    fit = function(x, y, task, weights, ...) {
      stats::glm(y ~ ., data = as.data.frame(x),
                 family = stats::binomial(), weights = weights)
    },
    predict = function(object, newdata, task, ...) {
      as.numeric(stats::predict(object,
                                newdata = as.data.frame(newdata),
                                type = "response"))
    }
  )
)
fit <- fit_resample(df, outcome = "outcome", splits = splits,
                    learner = "glm", custom_learners = custom,
                    metrics = "auc", refit = FALSE, seed = 1)
aud <- audit_leakage(fit, metric = "auc", B = 10,
                     X_ref = df[, c("x1", "x2")])
show(aud)
}
