
HTML drift and calibration report from the monitoring log
Source:R/point_of_care.R
write_drift_report.RdWrites 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/.jsonlpath (seeupdate_monitoring_log()).- out_path
HTML file to write.
- scores
Optional data.frame with
prob_colandoutcome_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.