4744e062ffe801fe2c7c1faa2bda385f293d5b37,sklearn/ensemble/tests/test_gradient_boosting_loss_functions.py,,test_binomial_deviance,#,22

Before Change


    test_data = [(np.array([1.0, 1.0, 1.0]), np.array([100.0, 100.0, 100.0])),
                 (np.array([0.0, 0.0, 0.0]), np.array([100.0, 100.0, 100.0])),
                 (np.array([0.0, 0.0, 0.0]),
                  np.array([-100.0, -100.0, -100.0])),
                 (np.array([1.0, 1.0, 1.0]),
                  np.array([-100.0, -100.0, -100.0]))]

After Change


        z = 2 * y - 1
        return 2 * np.mean(np.log(1 + np.exp(-z * raw_pred)))

    test_data = product(
        (np.array([0., 0, 0]), np.array([1., 1, 1])),
        (np.array([-5., -5, -5]), np.array([3., 3, 3])))

    for datum in test_data:
        assert bd(*datum) == approx(alt_dev(*datum))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: scikit-learn/scikit-learn
Commit Name: 4744e062ffe801fe2c7c1faa2bda385f293d5b37
Time: 2020-08-31
Author: lorentzen.ch@gmail.com
File Name: sklearn/ensemble/tests/test_gradient_boosting_loss_functions.py
Class Name:
Method Name: test_binomial_deviance


Project Name: pgmpy/pgmpy
Commit Name: b384268df66742de0bc92a13db162b8409dda730
Time: 2019-04-19
Author: ankurankan@gmail.com
File Name: pgmpy/readwrite/BIF.py
Class Name: BIFReader
Method Name: get_values


Project Name: rasbt/mlxtend
Commit Name: e2b67b112d0f3db38221d8dd0c9efc395e17792e
Time: 2020-05-13
Author: mail@sebastianraschka.com
File Name: mlxtend/evaluate/bootstrap_point632.py
Class Name:
Method Name: no_information_rate