Skip to contents

Writes one self-contained HTML file (inline SVG, no scripts or external requests, aggregates only) with the PSI trend, Brier trajectory, O/E ratio, a predicted-vs-observed calibration curve (when scores has outcomes) and the monthly table. Mirror of Python omop_etl.drift_report.write_drift_report.

Usage

write_drift_report(
  log,
  out_path,
  scores = NULL,
  prob_col = "prob",
  outcome_col = "outcome_flag",
  model_version = NULL,
  months = 12L,
  title = "Model monitoring report"
)

Arguments

log

Monitoring log: data.frame or a .csv / .jsonl path (see update_monitoring_log()).

out_path

HTML file to write.

scores

Optional data.frame with prob_col and outcome_col.

prob_col, outcome_col

Column names in scores.

model_version

Version to report (default: the latest in the log).

months

Number of most recent months.

title

Page title.

Value

out_path, invisibly.