Exemple #1
0
            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

        # --- Also plotting the number of detected change-points
        if saveallfigs:
            savefig = mainfig.replace('main', 'main_NumberOfCPDetections')
            print(
                " - Plotting the memory consumption, and saving the plot to {} ..."
                .format(savefig))
            evaluation.plotNumberOfCPDetections(
                envId, savefig=savefig)  # XXX To save the figure
        else:
            evaluation.plotNumberOfCPDetections(
                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...")
    evaluation.plotLastRegrets(envId, sharex=True, sharey=True)

# Done
print("Done for simulations example_of_main_singleplayer ...")