Core

class bt4vt.core.BiasTest[source]

Elementary Class for implementing Bias tests.

evaluate_dataset()[source]

This is an empty method that can be implemented by subclasses.

plot()[source]

This is an empty method that can be implemented by subclasses.

run_tests()[source]

Runs bias tests. This is an empty method that needs to be implemented by subclasses

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

evaluate_dataset()[source]

This is an empty method that can be implemented by subclasses.

run_tests()[source]

Main method of the SpeakerBiasTest class which performs bias evaluation and tests. This function calls evaluate.evaluate_scores() from evaluate.py for the overall dataset. Later subgroups are constructed using groups.split_scores_by_speaker_groups() from groups.py. These subgroup scores are again evaluated using evaluate.evaluate_scores(). Lastly metric ratios are computed calling metrics.compute_metrics_ratios() from metrics.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