src.evaluation package

Submodules

src.evaluation.evaluator module

File that contains the evaluator class implementing basic evaluation functionality and data reading

class src.evaluation.evaluator.Evaluator

Bases: object

Class that contains basic evaluation functionality

get_labels(modality: str, predictions_key: str, parameters: Dict[str, Any], data_folder: Optional[str] = None) ndarray

Function that returns labels without recomputing them if used before.

Parameters:
  • modality – The modality of the data.

  • predictions_key – “test_predictions” or “predicitons”

  • parameters – Additional parameters required for label generation.

  • data_folder – Data folder for the data reader.

Returns:

Label numpy array.

get_parameters() List[Dict]

Function that returns the parameters of all experiments in a list.

Returns:

List of all experiment configurations without predictions.

get_scores(score: str, **kwargs) List[float]

Function that uses all experiments in this evaluator and computes a score for them. Returns a list of scores.

Parameters:
  • score – String that represents the score to compute

  • kwargs – Additional keyword arguments

Returns:

List of computed scores

read_results(paths: Union[str, Iterable[str]]) None

Main data reading function that reads all results from files.

Parameters:

paths – Paths argument that can contain different things: - A string that contains the path to a single results file - A string that is used for glob.glob (must contain at least one *) - An iterable (e.g. list) of strings of single files

Module contents

Module that contains code for evaluating and comparing the trained classifiers