Utils

mushroom_rl_benchmark.utils.utils.get_init_states(dataset)[source]

Get the initial states of a MushroomRL dataset

Parameters:dataset (Dataset) – a MushroomRL dataset.
mushroom_rl_benchmark.utils.utils.extract_arguments(args, method)[source]

Extract the arguments from a dictionary that fit to a methods parameters.

Parameters:
  • args (dict) – dictionary of arguments;
  • method (function) – method for which the arguments should be extracted.
mushroom_rl_benchmark.utils.primitive.object_to_primitive(obj)[source]

Converts an object into a string using the class name

Parameters:obj – the object to convert.
Returns:A string representing the object.
mushroom_rl_benchmark.utils.primitive.dictionary_to_primitive(data)[source]

Function that converts a dictionary by transforming any objects inside into strings

Parameters:data (dict) – the dictionary to convert.
Returns:The converted dictionary.
mushroom_rl_benchmark.utils.plot.get_mean_and_confidence(data)[source]

Compute the mean and 95% confidence interval

Parameters:data (np.ndarray) – Array of experiment data of shape (n_runs, n_epochs).
Returns:The mean of the dataset at each epoch along with the confidence interval.
mushroom_rl_benchmark.utils.plot.plot_mean_conf(data, ax, color='blue', facecolor=None, alpha=0.4, label=None)[source]

Method to plot mean and confidence interval for data on pyplot axes.