fig = plt.figure(figsize=(12, 4)) usplt.plot_ecalib_over_etrue_functionof_etrue(LinearRegression, data2) plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue.png") plt.close() #histogram of ecalib and etrue fig = plt.figure(figsize=(12, 5)) usplt.hist_ecalib(LinearRegression, data2) plt.show() savefig(fig, directory, classname + "_histograms_ecalib_etrue.png") savefig(fig, directory, classname + "_histograms_ecalib_etrue.eps") plt.close() #ecalib/etrue in function of ecal,hcal fig = plt.figure(figsize=(12, 4)) usplt.plot_ecalib_over_etrue_functionof_ecal_hcal(LinearRegression, data2) plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue_functionof_ecal_hcal.png") plt.close() #ecalib/etrue gaussian fit curve fig = plt.figure(figsize=(12, 10)) usplt.plot_gaussianfitcurve_ecalib_over_etrue_functionof_ecal_hcal( LinearRegression, data2) plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue_curve.png") savefig(fig, directory, classname + "_ecalib_over_etrue_curve.eps") plt.close()
usplt.hist_ecalib(KNNGFD, data2) #plt.show() savefig(fig, directory, classname + "_histograms_ecalib_etrue.png") plt.close() #ecalib/etrue in function of ecal,hcal fig = plt.figure(figsize=(10, 5)) usplt.plot_ecalib_over_etrue_functionof_ecal_hcal(KNNGFD, data2) #plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue_functionof_ecal_hcal.png") plt.close() #ecalib/etrue gaussian fit curve fig = plt.figure(figsize=(10, 10)) usplt.plot_gaussianfitcurve_ecalib_over_etrue_functionof_ecal_hcal( KNNGFD, data2) #plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue_curve.png") plt.close() #courbe de calibration pour ecal = 0 hcal_train = KNNGFD.hcal_train_ecal_eq_0 true_train = KNNGFD.true_train_ecal_eq_0 h = np.arange(min(hcal_train), lim, 0.1) e = np.zeros(len(h)) t = KNNGFD.predict(e, h) #neigh for ecal == 0 h_neigh = np.arange(10, lim, 30) e_neigh = np.zeros(len(h_neigh)) neigh = KNNGFD.neighborhood(e_neigh, h_neigh)
plt.show() savefig(fig, directory, classname + "_histograms_ecalib_etrue.png") savefig(fig, directory, classname + "_histograms_ecalib_etrue.eps") plt.close() #ecalib/etrue in function of ecal,hcal fig = plt.figure(figsize=(12, 4)) usplt.plot_ecalib_over_etrue_functionof_ecal_hcal(CalibrationLego, data2) plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue_functionof_ecal_hcal.png") plt.close() #ecalib/etrue gaussian fit curve fig = plt.figure(figsize=(12, 10)) usplt.plot_gaussianfitcurve_ecalib_over_etrue_functionof_ecal_hcal( CalibrationLego, data2) plt.show() savefig(fig, directory, classname + "_ecalib_over_etrue_curve.png") savefig(fig, directory, classname + "_ecalib_over_etrue_curve.eps") plt.close() # Plot of the Legos ecal = CalibrationLego.ecal hcal = CalibrationLego.hcal true = CalibrationLego.true true[np.isnan(true)] = 0 ind = true != 0 fig = plt.figure(1, figsize=(6, 4)) ax = plt.axes(projection='3d') x = ecal[ind]