1 rri_metrics.plotting
rri_metrics.plotting
Build candidate-aligned Plotly figures for RRI and distance diagnostics.
This module visualizes RriResult labels, squared point–mesh components, and selected candidate geometry. It owns presentation only: candidate order, validity, actor-visible inputs, and oracle-label construction remain with their source payloads and callers. Distance chart values are in square metres when the underlying geometry is metric world-frame data.
1.1 Classes
| Name | Description |
|---|---|
| RriOrdinalPreview | Finite RRI population, fitted quantile edges, and resulting class counts. |
1.1.1 RriOrdinalPreview
rri_metrics.plotting.RriOrdinalPreview(values, edges, class_counts, num_classes)Finite RRI population, fitted quantile edges, and resulting class counts.
1.2 Functions
| Name | Description |
|---|---|
| build_rri_ordinal_preview | Fit the production ordinal binner and return immutable preview evidence. |
| plot_pm_accuracy | Plot pre/post mean-squared point-to-mesh accuracy errors in square metres. |
| plot_pm_completeness | Plot pre/post mean-squared mesh-to-point completeness errors in square metres. |
| plot_pm_distances | Plot broadcast pre-view and per-candidate post-view bidirectional errors in square metres. |
| plot_rri_scores | Build one dimensionless oracle-RRI bar per candidate label. |
| rri_color_map | Assign colors deterministically in input-label order, cycling the palette when needed. |
| rri_ordinal_preview_figures | Build raw-value/edge and class-count figures from one fitted preview. |
1.2.1 build_rri_ordinal_preview
rri_metrics.plotting.build_rri_ordinal_preview(values, *, num_classes)Fit the production ordinal binner and return immutable preview evidence.
1.2.2 plot_pm_accuracy
rri_metrics.plotting.plot_pm_accuracy(
rri,
labels,
color_map,
*,
baseline_label='-1',
title,
)Plot pre/post mean-squared point-to-mesh accuracy errors in square metres.
1.2.3 plot_pm_completeness
rri_metrics.plotting.plot_pm_completeness(
rri,
labels,
color_map,
*,
baseline_label='-1',
title,
)Plot pre/post mean-squared mesh-to-point completeness errors in square metres.
1.2.4 plot_pm_distances
rri_metrics.plotting.plot_pm_distances(
rri,
labels,
color_map,
*,
baseline_label='-1',
title,
)Plot broadcast pre-view and per-candidate post-view bidirectional errors in square metres.
1.2.5 plot_rri_scores
rri_metrics.plotting.plot_rri_scores(rri, labels, color_map, *, title)Build one dimensionless oracle-RRI bar per candidate label.
1.2.5.1 Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| rri | RriResult | Candidate-aligned oracle result. | required |
| labels | Sequence[str] | Display labels in the same order as rri.rri. |
required |
| color_map | Mapping[str, str] | Color lookup containing every display label. | required |
| title | str | Figure title. | required |
1.2.5.2 Returns
| Name | Type | Description |
|---|---|---|
go.Figure |
Plotly bar figure whose x-axis is candidate identity and whose y-axis | |
go.Figure |
is dimensionless RRI. Negative bars are valid low-utility labels, not | |
go.Figure |
invalid-candidate markers. |
1.2.6 rri_color_map
rri_metrics.plotting.rri_color_map(labels, *, palette=None)Assign colors deterministically in input-label order, cycling the palette when needed.
1.2.7 rri_ordinal_preview_figures
rri_metrics.plotting.rri_ordinal_preview_figures(
preview,
*,
histogram_bins,
rri_label,
)Build raw-value/edge and class-count figures from one fitted preview.