MatthewsCorrelationOnThresholdedDiagnostics#

class rojak.turbulence.analysis.MatthewsCorrelationOnThresholdedDiagnostics(diagnostic_indices, severities, thresholds, threshold_mode, /, **sel_condition)[source]#

Computes the Matthew’s Correlation Coefficient between diagnostics, thresholded at each turbulence severity

For each severity, applies TurbulentRegionFromThreshold to obtain boolean turbulent regions for every diagnostic in diagnostic_indices, then computes the pairwise Matthew’s Correlation Coefficient between those boolean regions using MatthewsCorrelationOnDataset.

Parameters:
__init__(diagnostic_indices, severities, thresholds, threshold_mode, /, **sel_condition)[source]#
Parameters:
  • diagnostic_indices (Dataset) – Dataset of computed diagnostic values

  • severities (list[TurbulenceSeverity]) – Turbulence severities to compute the correlation for

  • thresholds (Mapping[DiagnosticName, TurbulenceThresholds]) – Mapping from diagnostic name to its TurbulenceThresholds

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

  • **sel_condition – Passed to xarray.Dataset.sel() to subset diagnostic_indices

Return type:

None

Methods

__init__(diagnostic_indices, severities, ...)

execute()

Compute the Matthew's Correlation Coefficient between diagnostics for each severity