sage.plotting.prediction_probability

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

Created on 2026-03-21 17:27:00

__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_prediction_probability(epoch, pred_prob, labels)

Plot overlapping histograms of predicted ranking statistic for signal and noise.

Module Contents

plot_prediction_probability(epoch, pred_prob, labels, export_dir=None, save=True)[source]

Plot overlapping histograms of predicted ranking statistic for signal and noise.

Visualises how well the network separates the two classes by plotting the distribution of pred_prob for label=1 (signal) and label=0 (noise) on the same axes.

Parameters:
  • epoch (int or str) – Epoch identifier for the title and filename.

  • pred_prob (array-like, shape (N,)) – Predicted ranking statistics (raw logits or probabilities).

  • labels (array-like, shape (N,)) – Binary ground-truth labels (1 = signal, 0 = noise).

  • export_dir (str or None) – Directory to save the figure (under PRED_PROB/).

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