energystep_ecal_eq_0=energystep_ecal_eq_0,
                                 energystep_ecal_neq_0=energystep_ecal_neq_0,
                                 kind='cubic')
    KNNGF.saveCalib()

classname = KNNGF.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(5, 5))
usplt.plot3D_training(data1)
plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")
savefig(fig, 'img_index/', classname + "_plot3D_training.png")

#plot 3D surface calibration
fig = plt.figure(1, figsize=(5, 5))
usplt.plot3D_surf(KNNGF, data1)
plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
savefig(fig, 'img_index/', classname + "_plot3D_surf.png")

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(10, 4))
usplt.plotCalibrationCurve(KNNGF)
plt.show()
savefig(fig, directory, classname + "_calibration.png")
savefig(fig, 'img_index/', classname + "_calibration.png")

#ecalib/true in function of etrue
fig = plt.figure(figsize=(10, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(KNNGF, data2)
plt.show()
Пример #2
0
        n_neighbors_ecal_eq_0=n_neighbors_ecal_eq_0,
        n_neighbors_ecal_neq_0=n_neighbors_ecal_neq_0,
        lim=lim)
    KNNGFD.saveCalib()

classname = KNNGFD.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(5, 4))
usplt.plot3D_training(data1)
#plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")
plt.close()

#plot 3D surface calibration
fig = plt.figure(1, figsize=(5, 4))
usplt.plot3D_surf(KNNGFD)
#plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
plt.close()

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(10, 4))
usplt.plotCalibrationCurve(KNNGFD)
#plt.show()
savefig(fig, directory, classname + "_calibration.png")
plt.close()

#ecalib/true in function of etrue
fig = plt.figure(figsize=(10, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(KNNGFD, data2)
#plt.show()
    KNNGC = data1.KNNGaussianCleaning(n_neighbors_ecal_eq_0,
                                      n_neighbors_ecal_neq_0, weights,
                                      algorithm, sigma, lim, energystep, kind,
                                      cut)
    KNNGC.saveCalib()

classname = KNNGC.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_training(data1)
plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")

#plot 3D surface calibration
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_surf(KNNGC)
plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
savefig(fig, directory, classname + "_plot3D_surf.eps")
plt.close()

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(12, 4))
usplt.plotCalibrationCurve(KNNGC)
plt.show()
savefig(fig, directory, classname + "_calibration.png")
plt.close()

#ecalib/true in function of etrue
fig = plt.figure(figsize=(12, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(KNNGC, data2)
    # We create the calibration
    LinearRegression = data1.LinearRegression(lim_min=20, lim_max=80, lim=150)
    # We save the calibration
    LinearRegression.saveCalib()

classname = LinearRegression.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_training(data1)
plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")
plt.close()

#plot 3D surface calibration
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_surf(LinearRegression)
plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
savefig(fig, directory, classname + "_plot3D_surf.eps")
plt.close()

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(12, 4))
usplt.plotCalibrationCurve(LinearRegression)
plt.show()
savefig(fig, directory, classname + "_calibration.png")
plt.close()

#ecalib/true in function of etrue
fig = plt.figure(figsize=(12, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(LinearRegression, data2)
except FileNotFoundError:
    # We create the calibration
    CalibrationLego = data1.CalibrationLego(nbLego=nbLego)
    CalibrationLego.saveCalib()

classname = CalibrationLego.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_training(data1)
plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")
plt.close()

#plot 3D surface calibration
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_surf(CalibrationLego)
plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
savefig(fig, directory, classname + "_plot3D_surf.eps")
plt.close()

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(12, 4))
usplt.plotCalibrationCurve(CalibrationLego)
plt.show()
savefig(fig, directory, classname + "_calibration.png")
plt.close()

#ecalib/true in function of etrue
fig = plt.figure(figsize=(12, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(CalibrationLego, data2)
Пример #6
0
    # We create the calibration
    LinearRegression = data1.LinearRegression(lim_min=20, lim_max=80, lim=150)
    # We save the calibration
    LinearRegression.saveCalib()

classname = LinearRegression.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(5, 5))
usplt.plot3D_training(data1)
#plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")
plt.close()

#plot 3D surface calibration
fig = plt.figure(1, figsize=(5, 5))
usplt.plot3D_surf(LinearRegression, data1)
#plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
plt.close()

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(10, 4))
usplt.plotCalibrationCurve(LinearRegression)
#plt.show()
savefig(fig, directory, classname + "_calibration.png")
plt.close()

#ecalib/true in function of etrue
fig = plt.figure(figsize=(10, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(LinearRegression, data2)
#plt.show()
Пример #7
0
    # We create the calibration
    KNN = data1.KNN(n_neighbors_ecal_eq_0, n_neighbors_ecal_neq_0, weights,
                    algorithm, sigma, lim)
    KNN.saveCalib()

classname = KNN.classname
#plot 3D Training points
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_training(data1)
plt.show()
savefig(fig, directory, classname + "_plot3D_training.png")
plt.close()

#plot 3D surface calibration
fig = plt.figure(1, figsize=(6, 4))
usplt.plot3D_surf(KNN)
plt.show()
savefig(fig, directory, classname + "_plot3D_surf.png")
savefig(fig, directory, classname + "_plot3D_surf.eps")
plt.close()

#courbe de calibration pour ecal = 0
fig = plt.figure(figsize=(12, 4))
usplt.plotCalibrationCurve(KNN)
plt.show()
savefig(fig, directory, classname + "_calibration.png")
plt.close()

#ecalib/true in function of etrue
fig = plt.figure(figsize=(12, 4))
usplt.plot_ecalib_over_etrue_functionof_etrue(KNN, data2)