예제 #1
0
        # --- Also plotting the boxplot of last regrets
        if saveallfigs:
            savefig = mainfig.replace('main', 'main_BoxPlotRegret')
            evaluation.plotLastRegrets(envId, boxplot=True, savefig=savefig)
        else:
            evaluation.plotLastRegrets(
                envId, boxplot=True)  # XXX To plot without saving

        # --- Also plotting the running times
        if saveallfigs:
            savefig = mainfig.replace('main', 'main_RunningTimes')
            print(
                " - Plotting the running times, and saving the plot to {} ...".
                format(savefig))
            evaluation.plotRunningTimes(
                envId, savefig=savefig)  # XXX To save the figure
        else:
            evaluation.plotRunningTimes(envId)  # XXX To plot without saving

        # --- Also plotting the memory consumption
        if saveallfigs:
            savefig = mainfig.replace('main', 'main_MemoryConsumption')
            print(
                " - Plotting the memory consumption, and saving the plot to {} ..."
                .format(savefig))
            evaluation.plotMemoryConsumption(
                envId, savefig=savefig)  # XXX To save the figure
        else:
            evaluation.plotMemoryConsumption(
                envId)  # XXX To plot without saving
# Compare them
for envId, env in enumerate(evaluation.envs):
    evaluation.plotHistoryOfMeans(envId)  # XXX To plot without saving

    print("\nGiving all the vector of final regrets ...")
    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...")