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: 3

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: snorkel-team/snorkel
Commit Name: 40ba361ebc36b0a6ed5c026d9d6b71d42b71a60b
Time: 2019-08-13
Author: ajratner@gmail.com
File Name: tutorials/synthetic/synthetic.py
Class Name:
Method Name:


Project Name: ClimbsRocks/auto_ml
Commit Name: 019f0c822cd8f2833d3b25855f2df99cd5a465a4
Time: 2017-08-17
Author: ClimbsBytes@gmail.com
File Name: auto_ml/utils_model_training.py
Class Name: FinalModelATC
Method Name: fit