sage.plotting.efficiency2d
Filename : efficiency2d.py Description : Short description of the file
Created on 2026-03-21 17:46:43
__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 a 2D heatmap of detection efficiency as a function of two parameters. |
Module Contents
- plot_2d_efficiency(epoch, ranking_stat, labels, source_params, param_x, param_y, threshold, export_dir=None, save=True, bins_x=20, bins_y=20)[source]
Plot a 2D heatmap of detection efficiency as a function of two parameters.
Computes the fraction of signals above
thresholdin each (param_x,param_y) bin and displays the result as a colour-coded grid. Useful for identifying regions of parameter space where sensitivity drops.- Parameters:
epoch (int or str) – Epoch identifier for the title and filename.
ranking_stat (array-like, shape
(N,)) – Predicted ranking statistics.labels (array-like, shape
(N,)) – Binary ground-truth labels.source_params (dict[str, array-like]) – Per-signal parameter arrays.
param_x (str) – Key in
source_paramsfor the x-axis parameter.param_y (str) – Key in
source_paramsfor the y-axis parameter.threshold (float) – Detection threshold on the ranking statistic.
export_dir (str or None) – Output directory.
save (bool) – If
True, save to disk; otherwise display.bins_x (int) – Number of x-axis bins (default
20).bins_y (int) – Number of y-axis bins (default
20).