load_estimator_results_to_dict¶
- tsml_eval.utils.results_loading.load_estimator_results_to_dict(load_path, estimator_names, dataset_names, measure, resamples=None, split='test')[source]¶
Load and convert EstimatorResults objects to a dictionary of metrics.
Follows the output format of
aeondict results loaders.- Parameters:
- load_pathstr or list of str
The path to the collection of estimator result files to convert. If load_path is a list, it will load results from each path in the list. It is expected that estimator_names and dataset_names are lists of lists with the same length as load_path.
- estimator_nameslist of str, or list of list
The names of the estimators to convert. If load_path is a list, estimator_names must be a list of lists with the same length as load_path.
- dataset_namesstr, list of str or list of list
The names of the datasets to convert. If a list of strings, each item is the name of a dataset. If a string, it is the path to a file containing the names of the datasets, one per line. If load_path is a list, dataset_names must be a list of lists with the same length as load_path.
- measurestr
A valid metric attribute from the relevant EstimatorResults object. Dependent on the task, i.e. for classification, “accuracy”, “auroc”, “balacc”, and regression, “mse”, “mae”, “r2”.
- resamplesint or list of int, default=None
The resamples to load. If int, loads resamples 0 to resamples-1. For 1 or None, only the loaded score is returned. For 2 or more, a np.ndarray of scores for all resamples up to resamples are returned.
- splitstr, default=”test”
The split to load results for, appears at the start of the results file name. Should be one of “train”, “test” in most circumstances.
- Returns:
- results: dict
Dictionary with estimator name keys containing another dictionary. Sub-dictionary consists of dataset name keys and contains of scores for each dataset.