sage.plotting.correllation_matrix

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

Created on 2026-03-21 17:52:33

__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_correlation_matrix(ranking_stat, source_params, ...)

Plot a Pearson correlation matrix between source parameters and ranking statistic.

Module Contents

plot_correlation_matrix(ranking_stat, source_params, labels, export_dir=None, save=True, epoch=None)[source]

Plot a Pearson correlation matrix between source parameters and ranking statistic.

Computes pairwise correlations for all source parameters plus the ranking statistic, restricting to signal events and dropping any rows containing NaN values. Useful for checking whether the network’s output is driven by a single parameter.

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

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

  • labels (array-like, shape (N,)) – Binary labels; only signal rows (label == 1) are included.

  • 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 (optional).