savefig=savefig, cumulated=True, upperbound=False) else: evaluation.plotNbCollisions( envId, cumulated=True, upperbound=False) # XXX To plot without saving # --- Also plotting the frequency of collision in each arm for piechart in [False, True]: print("\n- Plotting the frequency of collision in each arm") if saveallfigs: savefig = mainfig.replace( 'main', 'main_FrequencyCollisions%s' % ('' if piechart else 'Hist')) print(" and saving the plot to {} ...".format(savefig)) evaluation.plotFrequencyCollisions(envId, savefig=savefig, piechart=piechart) else: evaluation.plotFrequencyCollisions( envId, piechart=piechart) # XXX To plot without saving if saveallfigs: print("\n\n==> To see the figures, do :\neog", os.path.join(plot_dir, "main*{}.png".format(hashvalue))) # DEBUG # Done print("Done for simulations main_multiplayers.py ...") notify("Done for simulations main_multiplayers.py ...")
evaluation.printLastRegrets(envId) print("\nGiving the final ranking ...") evaluation.printFinalRanking(envId) print("\n\n- Plotting the last regrets...") evaluation.plotLastRegrets(envId, boxplot=True) print("\nGiving the mean and std running times ...") evaluation.printRunningTimes(envId) evaluation.plotRunningTimes(envId) print("\nGiving the mean and std running times ...") evaluation.printMemoryConsumption(envId) evaluation.plotMemoryConsumption(envId) print("\n\n- Plotting the mean reward...") evaluation.plotRegrets(envId, meanReward=True) print("\n\n- Plotting the regret...") evaluation.plotRegrets(envId) print("\n- Plotting the probability of picking the best arm of time...") evaluation.plotBestArmPulls(envId) print("\n- Plotting the histograms of regrets...") evaluation.plotLastRegrets(envId, sharex=True, sharey=True) # Done print("Done for simulations example_of_main_singleplayer ...") notify("Done for simulations example_of_main_singleplayer ...")
)) print(" and saving the plot to {} ...".format(savefig)) evaluation.plotLastRegrets( envId, savefig=savefig, sharex=sharex, sharey=sharey) # XXX To save the figure print( " - Plotting the histograms of regrets for each algorithm separately, and saving the plots ..." ) savefig = mainfig.replace('main', 'main_HistogramsRegret') print(" and saving the plot to {} ...".format(savefig)) evaluation.plotLastRegrets( envId, all_on_separate_figures=True, savefig=savefig) # XXX To save the figure else: evaluation.plotLastRegrets( envId, subplots=False) # XXX To plot without saving # for sharex, sharey in product([True, False], repeat=2): # XXX 3 out of 4 were UGLY! for sharex, sharey in [(True, False)]: evaluation.plotLastRegrets( envId, sharex=sharex, sharey=sharey) # XXX To plot without saving # evaluation.plotLastRegrets(envId, all_on_separate_figures=True) # XXX To plot without saving if saveallfigs: print("\n\n==> To see the figures, do :\neog", os.path.join(plot_dir, "main*{}.png".format(hashvalue))) # DEBUG # Done print("Done for simulations main.py ...") notify("Done for simulations main.py ...")
evaluators=eothers) print( "\n\n- Plotting the centralized regret for all 'players' values, in loglog scale" ) e0.plotRegretCentralized(envId, loglog=True, normalized=False, evaluators=eothers) print("\n\n- Plotting the centralized fairness (STD)") e0.plotFairness(envId, fairness='STD', evaluators=eothers) print( "\n- Plotting the cumulated total nb of collision as a function of time for all 'players' values" ) e0.plotNbCollisions(envId, cumulated=True, evaluators=eothers) print( "\n\n- Plotting the number of switches as a function of time for all 'players' values" ) e0.plotNbSwitchsCentralized(envId, cumulated=True, evaluators=eothers) print("\n- Plotting the histograms of regrets") e0.plotLastRegrets(envId, sharex=True, sharey=True, evaluators=eothers) # e0.plotLastRegrets(envId, all_on_separate_figures=True, evaluators=eothers) # Done print("Done for simulations example_of_main_multiplayers_more.py ...") notify("Done for simulations example_of_main_multiplayers_more.py ...")