Modifying Old GaussianProcessor Example To Run With GaussianProcessRegressor
I have an example from a data science book I am trying to run in a Jupyter notebook. The code sippet looks like this from sklearn.gaussian_process import GaussianProcess # define
Solution 1:
The error has the answer.
At yfit, MSE = gp.predict(xfit[:, np.newaxis])
you are trying to assign the result of predict to two variables while the predict only returns a single numpy.ndarray
.
To solve this issue, run
yfit = gp.predict(xfit[:, np.newaxis])
Post a Comment for "Modifying Old GaussianProcessor Example To Run With GaussianProcessRegressor"