ncaa_eval.evaluation.plotting module¶
Plotly visualization adapters for evaluation results.
Provides standalone functions that accept evaluation result objects
and return interactive plotly.graph_objects.Figure instances for
Jupyter notebook rendering.
- ncaa_eval.evaluation.plotting.plot_advancement_heatmap(result: SimulationResult, team_labels: Mapping[int, str] | None = None) Figure[source]¶
Heatmap of per-team advancement probabilities by round.
- Parameters:
result – Simulation result with
advancement_probsarray.team_labels – Optional mapping of team index (0..n-1, bracket position order) to display name. When
None, team indices are shown as-is. Note: keys are bracket indices, not canonical team IDs — useBracketStructure.team_index_mapto translate from team IDs to indices before passing this argument.
- Returns:
Interactive Plotly Figure showing a heatmap with teams on y-axis and rounds on x-axis.
- ncaa_eval.evaluation.plotting.plot_backtest_summary(result: BacktestResult, *, metrics: Sequence[str] | None = None) Figure[source]¶
Per-year metric values from a backtest result.
- Parameters:
result – Backtest result containing the summary DataFrame.
metrics – Metric column names to include. Defaults to all metric columns (excludes
elapsed_seconds).
- Returns:
Interactive Plotly Figure with one line per metric, x=year.
- ncaa_eval.evaluation.plotting.plot_metric_comparison(results: Mapping[str, BacktestResult], metric: str) Figure[source]¶
Multi-model overlay: one line per model for a given metric across years.
- Parameters:
results – Mapping of model name to BacktestResult.
metric – Metric column name to compare.
- Returns:
Interactive Plotly Figure with one line per model.
- ncaa_eval.evaluation.plotting.plot_reliability_diagram(y_true: ndarray[tuple[Any, ...], dtype[float64]], y_prob: ndarray[tuple[Any, ...], dtype[float64]], *, n_bins: int = 10, title: str | None = None) Figure[source]¶
Reliability diagram: predicted vs. actual probability with bin counts.
- Parameters:
y_true – Binary labels (0 or 1).
y_prob – Predicted probabilities for the positive class.
n_bins – Number of calibration bins (default 10).
title – Optional figure title.
- Returns:
Interactive Plotly Figure with calibration curve, diagonal reference, and bar overlay of per-bin sample counts.
- ncaa_eval.evaluation.plotting.plot_score_distribution(dist: BracketDistribution, *, title: str | None = None) Figure[source]¶
Histogram of bracket score distribution with percentile markers.
- Parameters:
dist – Bracket distribution with pre-computed histogram data and percentile values.
title – Optional figure title.
- Returns:
Interactive Plotly Figure with histogram bars and vertical percentile lines at 5th, 25th, 50th, 75th, and 95th.