Core¶
- class bt4vt.core.SpeakerBiasTest(scores, config_file)[source]¶
The primary purpose of the SpeakerBiasTest class is the implementation of the run_tests() method, which performs the bias tests.
- param scores:
Either path to csv or txt file or a Pandas DataFrame that includes information on the reference
and test utterances as well as corresponding labels and scores; labels have to be either {-1,1} or {0,1} :type scores: str or DataFrame :param config_file: path to yaml config file :type config_file: str
- run_tests()[source]¶
Main method of the SpeakerBiasTest class which performs bias evaluation and tests. This function calls
evaluate.evaluate_scores()fromevaluate.pyfor the overall dataset. Later subgroups are constructed usinggroups.split_scores_by_speaker_groups()fromgroups.py. These subgroup scores are again evaluated usingevaluate.evaluate_scores(). Lastly metric ratios are computed callingmetrics.compute_metrics_ratios()frommetrics.py.- Returns:
biastest_results_file to the results directory as specified in config.yaml, the name of the file contains the config filename and the scores filename. If a scores dataframe was provided instead of a scores filename the results file contains the date and time of the evaluation
- Return type:
csv_file