b4ebca8a338d461935a25c682c5a6e7e78f9e615,skopt/tests/test_sample.py,,test_simple_discrete,#,42

Before Change




def test_simple_discrete():
    g = points({"a": Categorical(1, 2), "b": Discrete(1, 4)},
                random_state=1)
    expected =[{"b": 1, "a": 2}, {"b": 2, "a": 1}, {"b": 2, "a": 2},
               {"b": 1, "a": 2}, {"b": 2, "a": 1}]

    for i in range(5):

After Change


    expected =[{"b": 1, "a": 2}, {"b": 2, "a": 1}, {"b": 2, "a": 2},
               {"b": 1, "a": 2}, {"b": 2, "a": 1}]

    for i,p in enumerate(points({"a": Categorical(1, 2), "b": Discrete(1, 4)},
                                len(expected), random_state=1)):
        assert_equal(p, expected[i])


def test_simple_continuous():
    expected =[{"a": 2, "b": 4.988739243755474},
               {"a": 1, "b": 1.0004574992693795}]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 5

Instances


Project Name: scikit-optimize/scikit-optimize
Commit Name: b4ebca8a338d461935a25c682c5a6e7e78f9e615
Time: 2016-04-26
Author: betatim@gmail.com
File Name: skopt/tests/test_sample.py
Class Name:
Method Name: test_simple_discrete


Project Name: scikit-optimize/scikit-optimize
Commit Name: b4ebca8a338d461935a25c682c5a6e7e78f9e615
Time: 2016-04-26
Author: betatim@gmail.com
File Name: skopt/tests/test_sample.py
Class Name:
Method Name: test_simple_continuous


Project Name: scikit-optimize/scikit-optimize
Commit Name: b4ebca8a338d461935a25c682c5a6e7e78f9e615
Time: 2016-04-26
Author: betatim@gmail.com
File Name: skopt/tests/test_sample.py
Class Name:
Method Name: test_simple_categorical


Project Name: scikit-optimize/scikit-optimize
Commit Name: b4ebca8a338d461935a25c682c5a6e7e78f9e615
Time: 2016-04-26
Author: betatim@gmail.com
File Name: skopt/tests/test_sample.py
Class Name:
Method Name: test_simple_grid


Project Name: scikit-optimize/scikit-optimize
Commit Name: b4ebca8a338d461935a25c682c5a6e7e78f9e615
Time: 2016-04-26
Author: betatim@gmail.com
File Name: skopt/tests/test_sample.py
Class Name:
Method Name: test_sub_grids