rlberry.manager
.plot_synchronized_curves¶
- rlberry.manager.plot_synchronized_curves(data, x, y, ax=None, error_representation='pi', level=0.9, show=True, savefig_fname=None, linestyles=False)[source]¶
Plot the performances contained in the data (see data parameter to learn what format it should be).
If there are several simulations, a confidence interval is plotted.
In all cases a smoothing is performed
- Parameters:
- data: a pandas dataframe
data must contain the columns “name”, “n_simu”, an x column and a y column.
“n_simu” contain the simulation number (e.g. the seed) for which the raw is computed.
“name” is the name of the algorithm for which the raw is computed.
x column is named according to x parameter and contain values to have in x axis.
y column is named according to y parameter and contain values to have in y axis.
- ax: matplotlib axis or None, default=None
Matplotlib axis on which we plot. If None, create one. Can be used to customize the plot.
- error_representation: str in {“raw_curves”, “ci”, “pi”}, default=”pi”
How to represent multiple simulations.
“raw curves” is a plot of the raw curves.
“pi” is a plot of a non-simultaneous prediction interval with gaussian model around the mean curve (e.g. we do curve plus/minus gaussian quantile times std).
“ci” is a confidence interval on the prediction interval with gaussian model around the mean curve (e.g. we do curve plus/minus gaussian quantile times std divided by sqrt of number of seeds).
- level: float, default=0.95,
Level of the confidence (or prediction) interval. Only used if error_representation is not “raw_curves”.
- show: bool, default=True
If true, calls plt.show().
- savefig_fname: str (Optional)
Name of the figure in which the plot is saved with figure.savefig. If None, the figure is not saved.
- linestyles: boolean, default=False
Whether to use different linestyles for each curve.