40ba361ebc36b0a6ed5c026d9d6b71d42b71a60b,test/synthetic/test_synthetic_data.py,TestGenerateSingleFeatureLFs,test_perfect_LF,#TestGenerateSingleFeatureLFs#,41

Before Change


        L = lf_applier.apply(data)

        // Get accuracies
        Ld = L.todense()
        Y = np.array([d.y for d in data])
        accs = Ld.T @ Y / self.n
        self.assertEqual(accs[0], 1.0)

    def test_abstain_rate(self) -> None:
        // Generate a dataset

After Change


        // Get accuracies
        // TODO: Replace this with a generic utility function
        Y = np.array([d.y for d in data])
        acc = np.where(L[:, 0].toarray().reshape(-1) == Y, 1, 0).sum() / self.n
        self.assertEqual(acc, 1.0)

    def test_abstain_rate(self) -> None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: snorkel-team/snorkel
Commit Name: 40ba361ebc36b0a6ed5c026d9d6b71d42b71a60b
Time: 2019-08-13
Author: ajratner@gmail.com
File Name: test/synthetic/test_synthetic_data.py
Class Name: TestGenerateSingleFeatureLFs
Method Name: test_perfect_LF


Project Name: deeptools/HiCExplorer
Commit Name: 5a04f03e55143925256bf1592a6edeb0612558e3
Time: 2017-12-04
Author: wolffj@informatik.uni-freiburg.de
File Name: hicexplorer/hicPCA.py
Class Name:
Method Name: main


Project Name: stellargraph/stellargraph
Commit Name: ce597a0b10658043b6d6d8ffed3fff4a6ebbc1ea
Time: 2019-09-26
Author: u5824685@anu.edu.au
File Name: stellargraph/layer/ppnp.py
Class Name: PPNP
Method Name: __init__