vertaix / Vendi-Score

MIT License
93 stars 8 forks source link

score_dual function - purpose of m ? #10

Open mglowacki100 opened 9 months ago

mglowacki100 commented 9 months ago
  1. I've looked at the function:

    def score_dual(X, q=1, normalize=True):
    if normalize:
        X = preprocessing.normalize(X, axis=1)
    n = X.shape[0]
    S = X.T @ X
    w = scipy.linalg.eigvalsh(S / n)
    m = w > 0
    return np.exp(entropy_q(w, q=q))

    from https://github.com/vertaix/Vendi-Score/blob/main/vendi_score/vendi.py, what is a purpose of line m = w > 0

  2. Does it make sense to use score_dual for calculation ensemble diversity ?