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
severitiesImplements
rojak lite turbulence diagnostic-correlation(rojak.cli.lite_interface.diagnostic_correlation()). Loads thresholds fromcontext.load_from(seeload_thresholds_from_file(), produced bycompute_thresholds()) and diagnostics previously exported to zarr (seeexport_turbulence_diagnostics()) fromcontext.data_dir, then exports the result tocontext.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.diagnosticsis not a subset of the diagnostics with thresholds loaded fromcontext.load_from- Return type:
None