Skip to content

failed test_ard_accuracy_on_easy_problem using specific seed #15420

@kwenlyou

Description

@kwenlyou

Description

the test failed using seed=45, however, it will pass if other seeds are used such as 46 or 47

Steps/Code to Reproduce

    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.0
E       assert 1.2070270934527727e-05 < 0.0

-->

Expected Results

pass

Actual Results

asser error

Versions

System:
    python: 3.6.8 (default, Oct  7 2019, 12:59:55)  [GCC 8.3.0]
executable: /usr/local/bin/python
   machine: Linux-4.15.0-1039-aws-x86_64-with-Ubuntu-18.04-bionic

Python deps:
       pip: 19.3.1
setuptools: 41.6.0
   sklearn: 0.22.dev0
     numpy: 1.17.3
     scipy: 1.3.1
    Cython: 0.29.13
    pandas: 0.25.2
matplotlib: 3.1.1
    joblib: 0.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions