def load_statistics(log_dir, statistics_file_name):
    """
    Loads the statistics in a dictionary.
    :param log_dir: The directory in which the log is saved
    :param statistics_file_name: The name of the statistics file
    :return: A dict with the statistics
    """
    data_dict = dict()
    with open("{}/{}.csv".format(log_dir, statistics_file_name), 'r') as f:
        lines = f.readlines()
        data_labels = lines[0].replace("\n", "").replace("\r", "").split(",")
        del lines[0]

        for label in data_labels:
            data_dict[label] = []

        for line in lines:
            data = line.replace("\n", "").replace("\r", "").split(",")
            for key, item in zip(data_labels, data):
                if item not in data_labels:
                    data_dict[key].append(item)
    return data_dict