我有一个单一的标签函数。当字符串出现在文本中时,它返回正大小写。42232例中有53例是这样的。在这个函数中,我得到的Snorkel标签总是-1。
# Define the set of labeling functions (LFs)
lfs = [lf_keyword_filmrechten]
# Apply the LFs to the unlabeled training data
applier = PandasLFApplier(lfs)
L_train = applier.apply(df_train)
# Train the label model and compute the training labels
label_model = LabelModel(cardinality=2, verbose=True)
label_model.fit(L_train, n_epochs=500, log_freq=50, seed=123)
df_train["label"] = label_model.predict(L=L_train, tie_break_policy="abstain")发布于 2019-08-24 23:00:51
还不确定解决方案,但可以在这里找到讨论:github
https://stackoverflow.com/questions/57625329
复制相似问题