mlquantify.visualization#
Visualization utilities for quantification.
A small collection of matplotlib *Display classes, following the
scikit-learn Display API (from_predictions / from_estimator /
from_protocol constructors, a plot method, and stored ax_ /
figure_ attributes). The plots are quantification-specific and do not
duplicate scikit-learn’s classification/regression displays.
Multiple-sample diagnostics (summarise an evaluation protocol run):
DiagonalDisplay— true vs. predicted prevalence scatter.BiasDisplay— signed-error boxplots, global or binned.ErrorByShiftDisplay— error vs. prior-probability shift.
Single-sample displays (inspect one prediction):
PrevalenceDisplay— per-class predicted prevalence bars.ConfidenceRegionDisplay— confidence interval / ternary ellipse.
This subpackage is intentionally not imported by import mlquantify so that
matplotlib stays off the top-level import path; import it explicitly:
from mlquantify.visualization import DiagonalDisplay
Multiple-sample displays#
True vs. |
|
Boxplots of signed prevalence-estimation error. |
|
Estimation error as a function of prior-probability shift. |
Single-sample displays#
Bar chart of a single sample's predicted class prevalence. |
|
Confidence region around a single prevalence prediction. |