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: