def plot_estim_quick(gamma, gamma_values=[ 0.1, 0.09, 0.08, 0.07, 0.06, 0.05, 0.04, 0.03, 0.02, 0.01 ], option_save="", path_Image="", ImageName=""): i = np.abs(np.array(gamma_values) - gamma).argmin() gamma_close = round(gamma_values[i], 3) ### load res = np.load(Current_directory + '\\Results\\res_gamma' + str(gamma_close) + '.npy').flatten().reshape((5, -1)) ### plot index = res[0, :] error1 = res[1, :] error2 = res[2, :] error3 = res[3, :] error4 = res[4, :] df = [[index, error1], [index, error2], [index, error3], [index, error4]] labels = ["1/n", "step_cste", "SAGA", "PASS"] mark = ['o', '*', 'x', 'v'] bbox_to_anchor_0 = (0.7, .75) plt.figure(figsize=(8, 5)) pltg.Plot_plot(df, labels, xlabel="Number of iterations", ylabel="Log L2 - error", option=option_save, path=path_Image, ImageName=ImageName, Nset_tick_x=False, mark=mark, bbox_to_anchor_0=bbox_to_anchor_0) plt.show()
##### Plot the improvement ##### Plot v1 start = 0 option_save = "" path_Image = Path_parent_directory + "\\Image" ImageName = "\\improvement__optimal_execution_f_final" df = [[error_v01[start:, 0], np.log(error_v01[start:, 1])]] labels = [" Benchmark"] mark = ['o'] fig = plt.figure(figsize=(8, 5)) pltg.Plot_plot(df, labels, xlabel="Number of iterations", ylabel="Log L2 - error", option=option_save, path=path_Image, ImageName=ImageName, Nset_tick_x=False, mark=mark) ############################################################################### ############################################################################### ############################# Plot the values ################################# ############################################################################### ############################################################################### ##### Plot the values option_save = "" path_Image = Path_parent_directory + "\\Image" ImageName = "\\improvement__optimal_execution_theo"