plotScoreDiffs#
- statrl.experiments.plotruns.plotScoreDiffs(learnersName, envName, title, mean, median, quantile1, quantile2, quantile3, quantile4, times, timeHorizon, logfile='', timestamp=0, root_folder='results/')[source]#
Draw the regret figures and record final regrets in the logfile.
Each agent gets a mean curve with markers, a dashed median, and two nested shaded bands (0.1-0.9 and 0.25-0.75).
- Parameters:
learnersName (list of str) – Agent names, used as legend labels and in the output filename.
envName (str) – Environment name, used in the output filename.
title (tuple of (str, str, str)) –
(figure_title, xlabel, ylabel). The two labels come fromplotlabels.mean (list of ndarray) – Per-agent mean and median regret over time.
median (list of ndarray) – Per-agent mean and median regret over time.
quantile1 (list of ndarray) – Per-agent regret quantiles at levels 0.1, 0.25, 0.75, and 0.9.
quantile2 (list of ndarray) – Per-agent regret quantiles at levels 0.1, 0.25, 0.75, and 0.9.
quantile3 (list of ndarray) – Per-agent regret quantiles at levels 0.1, 0.25, 0.75, and 0.9.
quantile4 (list of ndarray) – Per-agent regret quantiles at levels 0.1, 0.25, 0.75, and 0.9.
times (list of int) – Sampled time steps, shared by every series.
timeHorizon (int) – Horizon of the runs, used for the x-limit and in the filename.
logfile (file-like, default='') – Where final regrets are written. The default empty string selects
sys.stdout.timestamp (str, default=0) – Suffix making the filename unique across runs.
root_folder (str, default='results/') – Output directory. Must end with a separator.
- Returns:
Writes
Regrets_<agents>_<horizon>_<env>_<timestamp>as.pngand.pdf, plus an_ylogpair with a logarithmicyaxis.- Return type:
None
Notes
Colours and markers cycle after 9 and 5 agents respectively, so beyond that two agents become hard to tell apart.