Produces an HTML file with charts. Baseline-only figures are embedded as
SVG and work offline; GNN charts load Chart.js from its public CDN. The
report compares the fitted baseline with the calibrated blend, which may
include the neural component and other baseline contributions. This is not
a comparison isolating the neural component. With gnn = FALSE,
no neural network is fitted. Per-trait metrics, gate values, and held-out
diagnostic conformal coverage are included when available.
Usage
pigauto_report(
fit,
data = NULL,
splits = NULL,
output_path = "pigauto_report.html",
title = "pigauto Imputation Report",
open = TRUE
)Arguments
- fit
A
pigauto_fitobject (or apigauto_resultfromimpute).- data
Optional
pigauto_dataobject. Extracted automatically whenfitis apigauto_result, or reconstructed from a fit that retains its scaled observations. When supplied it must match the fit (species and traits).- splits
Optional splits object from
make_missing_splits. Extracted automatically from the result or fit when available. When supplied it must match the fit.- output_path
Character of length 1. File path for the HTML report (default
"pigauto_report.html"in the working directory).- title
Character of length 1. Report title (HTML-escaped on write).
- open
Logical of length 1. Open the report in a browser when done (default
TRUE).
Examples
# \donttest{
data(avonet300, tree300)
tree <- ape::keep.tip(tree300, tree300$tip.label[seq_len(30L)])
traits <- avonet300[match(tree$tip.label, avonet300$Species_Key),
c("Mass", "Wing.Length"), drop = FALSE]
rownames(traits) <- tree$tip.label
traits$Mass[seq_len(3L)] <- NA_real_
result <- impute(traits, tree, epochs = 5L, verbose = FALSE)
#> Warning: Small validation set for 2 trait(s): Mass (n=4), Wing.Length (n=3). Calibrated gate and conformal scores will be noisy for these trait(s). 95% split-conformal coverage is NOT achievable for 2 trait(s) with fewer than 19 validation cells (Mass (n=4), Wing.Length (n=3)): the achievable ceiling is n_val / (n_val + 1), which only reaches 0.95 at n_val >= 19. See `?fit_pigauto` under 'Calibration at small n' for smoothing options.
pigauto_report(result, output_path = tempfile(fileext = ".html"),
open = FALSE)
# }
