menu

snorkel

Building and managing training datasets for machine learning

Channels
# All channels
view-forward
# announcements
view-forward
# api
view-forward
# applications
view-forward
# help
view-forward
# projects
view-forward
# tutorials
view-forward
Team

Reason for at least three labeling functions in L_train while fitting a…

December 10, 2019 at 12:20pm

Reason for at least three labeling functions in L_train while fitting a LabelModel?

December 10, 2019 at 12:20pm (Edited 3 months ago)
import numpy as np
L = np.array([[0, 1], [0, 1], [1, 0]])
Y_dev = [0, 1, 0]
label_model = LabelModel(verbose=False)
label_model.fit(L)
label_model.fit(L, Y_dev=Y_dev)
label_model.fit(L)
ValueError: L_train should have at least 3 labeling functions

December 10, 2019 at 9:40pm
We need at least three labeling functions because the LabelModel relies on agreements and disagreements between labeling functions to determine their accuracies. If you have <= 2 labeling functions, then the accuracy cannot be uniquely determined using just their agreements and disagreements (there are more free variables than constraints).
  • reply
  • like

December 13, 2019 at 9:58am
Hey , thanks for getting back. That makes sense and clears my doubt.
  • reply
  • like