|
@@ -111,7 +111,7 @@ else:
|
|
)
|
|
)
|
|
|
|
|
|
# Fit the GPR Kernel to the input template
|
|
# Fit the GPR Kernel to the input template
|
|
-gpr = GaussianProcessRegressor(kernel=kernel, n_restarts_optimizer=3, alpha=2 * bin_errors)
|
|
|
|
|
|
+gpr = GaussianProcessRegressor(kernel=kernel, n_restarts_optimizer=3, alpha=bin_errors**2)
|
|
gpr.fit(bin_centers.reshape(len(bin_centers), 1), (bin_values - myBaseLine).ravel())
|
|
gpr.fit(bin_centers.reshape(len(bin_centers), 1), (bin_values - myBaseLine).ravel())
|
|
|
|
|
|
# Check to see if GPR Prediction is effectively the same as the exponential prior
|
|
# Check to see if GPR Prediction is effectively the same as the exponential prior
|
|
@@ -161,8 +161,8 @@ if(calculateSystematics):
|
|
kernel_systDown = gpr.kernel_.clone_with_theta(theta_down)
|
|
kernel_systDown = gpr.kernel_.clone_with_theta(theta_down)
|
|
|
|
|
|
# Perform the fits using the systematic kernels
|
|
# Perform the fits using the systematic kernels
|
|
- gpr_systUp = GaussianProcessRegressor(kernel=kernel_systUp, n_restarts_optimizer=3, alpha=2 * bin_errors)
|
|
|
|
- gpr_systDown = GaussianProcessRegressor(kernel=kernel_systDown, n_restarts_optimizer=3, alpha=2 * bin_errors)
|
|
|
|
|
|
+ gpr_systUp = GaussianProcessRegressor(kernel=kernel_systUp, n_restarts_optimizer=3, alpha=bin_errors**2)
|
|
|
|
+ gpr_systDown = GaussianProcessRegressor(kernel=kernel_systDown, n_restarts_optimizer=3, alpha=bin_errors**2)
|
|
|
|
|
|
gpr_systUp.fit(bin_centers.reshape(len(bin_centers), 1), (bin_values - myBaseLine).ravel())
|
|
gpr_systUp.fit(bin_centers.reshape(len(bin_centers), 1), (bin_values - myBaseLine).ravel())
|
|
gpr_systDown.fit(bin_centers.reshape(len(bin_centers), 1), (bin_values - myBaseLine).ravel())
|
|
gpr_systDown.fit(bin_centers.reshape(len(bin_centers), 1), (bin_values - myBaseLine).ravel())
|