sage.plotting.output_uncertainty

Filename : output_uncertainty.py Description : Short description of the file

Created on 2026-03-21 17:51:47

__author__ = Narenraju Nagarajan __copyright__ = Copyright 2026, ProjectName __license__ = MIT Licence __version__ = 0.0.1 __maintainer__ = Narenraju Nagarajan __affiliation__ = N/A __email__ = N/A __status__ = [‘inProgress’, ‘Archived’, ‘inUsage’, ‘Debugging’]

GitHub Repository: NULL

Documentation: NULL

Functions

plot_output_vs_uncertainty(model, source_params, labels)

Scatter plot of network ranking statistic vs model-predicted uncertainty.

Module Contents

plot_output_vs_uncertainty(model, source_params, labels, export_dir=None, save=True, epoch=None)[source]

Scatter plot of network ranking statistic vs model-predicted uncertainty.

Calls model.predict with return_uncertainty=True and plots the joint distribution of confidence and uncertainty for signal events. A well-calibrated model should show low uncertainty for high-confidence detections.

Parameters:
  • model (object with predict method) – Model that returns (ranking_stat, uncertainty) when called with return_uncertainty=True.

  • source_params (dict[str, array-like]) – Per-event parameter arrays passed to the model.

  • labels (array-like, shape (N,)) – Binary ground-truth labels.

  • export_dir (str or None) – Output directory.

  • save (bool) – If True, save to disk; otherwise display.

  • epoch (int or str or None) – Epoch identifier for the filename.