问题
I'm new to Gaussian processes and struggling to validate the output of my scikit GPR.
I'm particularly concerned with the fact that my GPR returns a score of 1, which doesn't make any sense to me because the coefficient of determination of this data should not be equal to 1.
Is there a particular problem with the GRP or data that is implied by a score of 1? I've included my code, and my X,Y are each arrays of length 15.
I have additionally tried both the Matern and RBF kernels on their own with default parameters. I get slightly different predictions but still with a score of 1 both times.
gp = gaussian_process.GaussianProcessRegressor(
alpha=1e-10,
copy_X_train=True,
kernel = Matern() + 1*RBF(1),
n_restarts_optimizer=10,
normalize_y=False,
random_state=None)
gp.fit(X, Y)
score = gp.score(X, Y)
print(score)
x_pred = np.atleast_2d(np.linspace(0,10,1000)).T
y_pred, sigma = gp.predict(x_pred, return_std=True)
Any advice is appreciated, thanks!
来源:https://stackoverflow.com/questions/61067867/understanding-score-of-1-in-scikit-learn-gaussian-process-regressor