-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
test_bayes.py fails #15186
Copy link
Copy link
Closed
Labels
Milestone
Description
Description
Testing failed for the test test_ard_accuracy_on_easy_problem in test_bayes.py
Steps/Code to Reproduce
pytest -x sklearn/linear_model/tests/test_bayes.py
Expected Results
All tests pass
Actual Results
def test_ard_accuracy_on_easy_problem():
# Check that ARD converges with reasonable accuracy on an easy problem
# (Github issue #14055)
# This particular seed seems to converge poorly in the failure-case
# (scipy==1.3.0, sklearn==0.21.2)
seed = 45
X = np.random.RandomState(seed=seed).normal(size=(250, 3))
y = X[:, 1]
regressor = ARDRegression()
regressor.fit(X, y)
abs_coef_error = np.abs(1 - regressor.coef_[1])
# Expect an accuracy of better than 1E-4 in most cases -
# Failure-case produces 0.16!
> assert abs_coef_error < 0.01
E assert 0.018021599217421413 < 0.01
sklearn/linear_model/tests/test_bayes.py:218: AssertionError
Versions
System:
python: 3.7.4 (default, Aug 13 2019, 20:35:49) [GCC 7.3.0]
executable: /home/corrie/.pyenv/versions/anaconda3-2019.03/bin/python
machine: Linux-5.0.0-31-generic-x86_64-with-debian-buster-sid
Python deps:
pip: 19.2.3
setuptools: 41.4.0
sklearn: 0.22.dev0
numpy: 1.17.2
scipy: 1.3.1
Cython: 0.29.13
pandas: 0.25.1
matplotlib: 3.1.1
joblib: 0.13.2
Reactions are currently unavailable