compute_haspi

Compute the HASPI scores.

recipes.cpc3.baseline.compute_haspi.compute_haspi_for_signal(record: dict, data_root: str, split: str) float[source]

Compute the HASPI score for a given signal.

Parameters:
  • record (dict) – the metadata dict for the signal

  • signal_dir (str) – paths to where the HA output signals are stored

  • ref_dir (str) – path to where the reference signals are stored

Returns:

HASPI score

Return type:

float

recipes.cpc3.baseline.compute_haspi.parse_signal_name(signal_name: str) dict[source]

Parse the signal name.

recipes.cpc3.baseline.compute_haspi.run_calculate_haspi(cfg: DictConfig) None[source]

Run the HASPI score computation.

recipes.cpc3.baseline.compute_haspi.set_seed_with_string(seed_string: str) None[source]

Set the random seed with a string.