'My gaussian process regressor is predicting 0 for any input
What I try to do is predict the next point of a function thanks to the 3 previous. For example, I want to predict (x3,y3) with ((x0,y0), (x1,y1), (x2,y2)) as input. When the vector x is a linspace everything works good but when it is a np.random.uniform then it does not work.
My training data looks like that : Training data
My test data looks like that : Test data
My model is a gaussian process and is defined as follow :
kernel = 1 * Matern(length_scale=1.0, nu=1.5)
gpr = GaussianProcessRegressor(kernel=kernel, random_state=42)
gpr.fit(train.Input, train.Output)
y_hat_gp, y_sigma = gpr.predict(test.Input, return_std=True)
The results I obtained are presented below : Prediction results
The only result I have is (0,0). Does anybody have an idea why it's not working?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
