sage.plotting.density2d

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

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

__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_2d_param_density(epoch, ranking_stat, labels, ...)

Scatter/hexbin of two source parameters coloured by ranking statistic.

Module Contents

plot_2d_param_density(epoch, ranking_stat, labels, source_params, param_x, param_y, export_dir=None, save=True, bins=50)[source]

Scatter/hexbin of two source parameters coloured by ranking statistic.

Visualises how the network’s confidence is distributed across the 2D parameter space spanned by param_x and param_y for signal events. Reveals parameter degeneracies or sensitivity gradients.

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

  • ranking_stat (array-like, shape (N,)) – Network ranking statistics.

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

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

  • param_x (str) – Key for the x-axis parameter.

  • param_y (str) – Key for the y-axis parameter.

  • export_dir (str or None) – Output directory.

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

  • bins (int) – Number of hexbin bins (default 50).