//%%
// Compare to the true (empirical) accuracies
Y = np.array([d.y for d in data])
accs_emp = lf_empirical_accuracies(L, Y)
accs_est = label_model.get_accuracies()
print(f"Avg. LF accuracy estimation error: {np.mean(np.abs(accs_emp - accs_est))}")
After Change
tfs = generate_resampling_tfs(list(range(d, d + n_noise_dim)))
policy = RandomAugmentationPolicy(len(tfs), sequence_length=1)
tf_applier = PandasTFApplier(tfs, policy, k=1, keep_original=True)
data_augmented = tf_applier.apply(data)
//%%
// Generate a set of m LFs that each fire based on a single feature