HazyResearch / flyingsquid

More interactive weak supervision with FlyingSquid
Apache License 2.0
313 stars 21 forks source link

_triplet_method_preprocess could produce triplet with only two entries #3

Closed coulls closed 4 years ago

coulls commented 4 years ago

In my experimentation, I ran into some cases where the _triplet_method_preprocess function adds triplets containing only two items.

Seems to happen when there are some dependencies included among LFs using lambda_edges.

In my local code, I've changes this: https://github.com/HazyResearch/flyingsquid/blob/master/flyingsquid/label_model.py#L346-L349 to the following code: if found and len(triplet) > 2: to prevent the fit() from failing.