Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fix sign error in gp + unit test #3180 #3181

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants

fix for issue #3180

@agramfort agramfort commented on the diff May 22, 2014

sklearn/gaussian_process/tests/test_gaussian_process.py
+ Test the interpolating property.
+ """
+
+ X = np.atleast_2d([1., 3., 5., 6., 7., 8., 9., 10., 12., 13., 14., 17.]).T
+ x = np.atleast_2d(np.linspace(0, 20, 100)).T
+
+ y = f(X).ravel() + np.random.normal(0, 0.1, len(X))
+
+ gp = GaussianProcess(regr=regr, corr=corr, beta0=beta0,
+ theta0=1e-2, thetaL=1e-4, thetaU=1.,
+ random_start=random_start, verbose=False, nugget=0.002).fit(X, y)
+
+ y_pred, MSE = gp.predict(x, eval_MSE=True)
+ y = f(x).ravel()
+
+ assert_true((np.abs(y_pred - y) <= (1.96 * MSE) ).all()) #check that true value is within 95% conf. int.
@agramfort

agramfort May 22, 2014

Owner

make sure your file is pep8 compliant

Owner

agramfort commented May 22, 2014

oh boy... any GP users/maintainers can have a look?

I don't think there are a lot of GP users ... because its not working well! see ticket #3163 as well

The bug is fixed now. It was a duplicate of #2632

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment