correlation_between_diagnostics#

rojak.orchestrator.lite_controller.correlation_between_diagnostics(context, *, severities, threshold_mode)[source]#

Compute the Matthew’s Correlation Coefficient between every pair of diagnostics, thresholded at severities

Implements rojak lite turbulence diagnostic-correlation (rojak.cli.lite_interface.diagnostic_correlation()). Loads thresholds from context.load_from (see load_thresholds_from_file(), produced by compute_thresholds()) and diagnostics previously exported to zarr (see export_turbulence_diagnostics()) from context.data_dir, then exports the result to context.output_dir.

Parameters:
  • context (TurbulenceContextWithAdditionalPath) – Configuration listing the diagnostics to correlate, the thresholds file to load, and where to read diagnostics from/write the result to

  • severities (list[TurbulenceSeverity]) – Turbulence severities to threshold diagnostics at before computing their correlation

  • threshold_mode (TurbulenceThresholdMode) – Whether severity thresholds are bounded intervals or lower bounds

Raises:

AssertionError – If context.diagnostics is not a subset of the diagnostics with thresholds loaded from context.load_from

Return type:

None