recipes.cpc3.baseline package
recipes.cpc3.baseline.compute_haspi module
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.
recipes.cpc3.baseline.evaluate module
Evaluate the predictions against the ground truth correctness values
-
recipes.cpc3.baseline.evaluate.compute_scores(predictions, labels) → dict[source]
Compute the scores for the predictions
-
recipes.cpc3.baseline.evaluate.evaluate(cfg: DictConfig) → None[source]
Evaluate the predictions against the ground truth correctness values
-
recipes.cpc3.baseline.evaluate.kt_score(x: ndarray, y: ndarray) → float[source]
Compute the Kendall’s tau correlation between two arrays
-
recipes.cpc3.baseline.evaluate.ncc_score(x: ndarray, y: ndarray) → float[source]
Compute the normalized cross correlation between two arrays
-
recipes.cpc3.baseline.evaluate.rmse_score(x: ndarray, y: ndarray) → float[source]
Compute the root mean squared error between two arrays
-
recipes.cpc3.baseline.evaluate.std_err(x: ndarray, y: ndarray) → float[source]
Compute the standard error between two arrays
recipes.cpc3.baseline.predict_dev module
Make intelligibility predictions from HASPI scores.
-
recipes.cpc3.baseline.predict_dev.predict_dev(cfg: DictConfig)[source]
Predict intelligibility from HASPI scores.
recipes.cpc3.baseline.predict_train module
Make intelligibility predictions from HASPI scores.
-
recipes.cpc3.baseline.predict_train.predict_train(cfg: DictConfig)[source]
Predict intelligibility from HASPI scores.
recipes.cpc3.baseline.shared_predict_utils module
-
class recipes.cpc3.baseline.shared_predict_utils.LogisticModel[source]
Bases: object
Class to represent a logistic mapping.
Fits a logistic mapping from input values x to output values y.
-
fit(x, y)[source]
Fit a mapping from x values to y values.
-
params: ndarray | None = None
-
predict(x)[source]
Predict y values given x.
- Raises:
TypeError – If the predict() method is called before fit().
-
recipes.cpc3.baseline.shared_predict_utils.load_dataset_with_haspi(cfg, split: str) → pandas.DataFrame[source]
Load dataset and add HASPI scores.
-
recipes.cpc3.baseline.shared_predict_utils.make_disjoint_train_set(full_df: pandas.DataFrame, test_df: pandas.DataFrame) → pandas.DataFrame[source]
Make a disjoint train set for given test samples.