Add validation visualisation functions#71
Conversation
024ccc4 to
0408fcc
Compare
Co-authored-by: Francisco Rowe <fcorowe@gmail.com>
PR #71 Review NotesReview approach:
General note on aesthetic editsSome minor aesthetic edits have been made directly in the validation visual If these visual changes are accepted, it may be worth transferring the relevant Cross-cutting point: make comparison structure visibleReview comment:
Suggested improvement:
Level 1: Overall fit metricsRequested change:
Reason:
Suggested implementation:
Follow-up requested change:
Suggested implementation:
Follow-up requested change:
Reason:
Follow-up requested change:
Review comment:
Level 2 and Level 3: Residual distributionsReview comment:
Suggested improvement:
Level 2 and Level 3: Residual scatterplotReview comment:
Suggested improvement:
Level 3: Residual outlier bandsReview comment:
Suggested improvement:
Level 4: Distributional allocation summaryReview comment:
Review comment:
Level 5: Residual-structure diagnosticsReview comment:
Suggested improvement:
Review comment:
|
Purpose
This PR adds package-level visualisation functions for displaying
debiasRvalidation metrics. The goal is to make validation results easier to inspect,
compare, and communicate across adjustment methods, raw MPD baselines, and
benchmark flows.
The visualisations are designed for validation outputs returned by the
validate_flow_*()functions. They provide exported plotting functions forreviewing model fit, residual distributions, distributional allocation metrics,
and residual-structure diagnostics.
Rendered Proposal
I have included a rendered HTML version of the full visual proposal in this PR:
The rendered file is committed at
notes/project-management/VALIDATION_VISUAL_PROTOTYPES.htmlwith its companionVALIDATION_VISUAL_PROTOTYPES_files/asset folder so the figures display.Summary
This PR:
adjusted_vs_benchmarkraw_vs_benchmarkraw_vs_adjustedadjusted_vs_benchmarkas the default comparison.plot_validation_*()functions for:sfboundariesuseful.
sorting, and residual-band method.
prototype notebook.
Notes For Review
Please check whether you are happy with the suggested plot types for each
validation metric.
I am happy with the current colour palette and font family, and I would like any
additional plots to follow the same visual theme.
I would like to keep the visualisation functions and package dependencies to a
minimum. The goal is to provide useful default validation displays without
making the plotting API or dependency surface too large.
Please consider whether any additional visualisation functions are needed. If
yes, please propose functions that follow the same theme, colour palette, and
font family.
In particular, feedback would be useful on whether there are better
visualisations for:
This does not include the LISA maps. I would like to keep the map
visualisations.
If new functions or visualisations are proposed, please start a discussion on
this PR. Please do not push changes directly to
main; we should agree on thedirection first.
Validation
Ran:
git diff --checkgit diff --cached --checktests/testthat/test-plot-validation.Rnotes/project-management/VALIDATION_VISUAL_PROTOTYPES.qmdtonotes/project-management/VALIDATION_VISUAL_PROTOTYPES.html, including theLISA map with user-supplied LAD and region boundaries