HazyResearch / liger

Liger: Fusing Weak Supervision and Model Embeddings
9 stars 4 forks source link

Change ABSTAIN to -1 instead of 0 #2

Open e-hossam96 opened 1 year ago

e-hossam96 commented 1 year ago

Hello all,

Thanks for this great effort. We have integrated Liger in our work and it is really promising. I just have a simple question.

I have adapted the code to work with -1 as the ABSTAIN class. I just don't understand what is meant by the following snippet.

closest_pos = [
    np.max(pos_dists[i], axis=1)
    if pos_dists[i].shape[1] > 0 else np.full(mat_abstains[i].shape, -1)
    for i in range(m)
]
closest_neg = [
    np.max(neg_dists[i], axis=1)
    if neg_dists[i].shape[1] > 0 else np.full(mat_abstains[i].shape, -1)
    for i in range(m)
]

To which value should I change the -1 in the np.full

Thanks