8000 simpler assertion in gp test · scikit-learn/scikit-learn@3fb6e73 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3fb6e73

Browse files
author
Jonas Seiler
committed
simpler assertion in gp test
1 parent 3240ae1 commit 3fb6e73

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

sklearn/gaussian_process/tests/test_gaussian_process.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
# Author: Vincent Dubourg <vincent.dubourg@gmail.com>
66
# Licence: BSD 3 clause
7-
from macpath import norm_error
8-
97
from nose.tools import raises
108
from nose.tools import assert_true
119

@@ -182,5 +180,5 @@ def test_1d_noisy(regr=regression.constant, corr=correlation.absolute_exponentia
182180
y_pred, MSE = gp.predict(x, eval_MSE=True)
183181

184182
y = f(x).ravel()
185-
assert_true((np.abs(y_pred - y) <= np.abs(
186-
ss.norm.ppf(0.025, y_pred, np.sqrt(MSE))) ).all()) #check that true value is within 95% conf. int.
183+
assert_true((np.abs(y_pred - y) <= (1.96 * MSE) ).all()) #check that true value is within 95% conf. int.
184+

0 commit comments

Comments
 (0)
0