vertaix / Vendi-Score

MIT License
97 stars 8 forks source link

IntDiv Function #11

Open mngom2 opened 9 months ago

mngom2 commented 9 months ago

Hi all!

There is a typo in the function intdiv in vendi.py:

def intdiv(elems, k, q=1, p=None):
    n = len(samples)
    K = np.zeros((n, n))
    for i in range(n):
        for j in range(i, n):
            K[i, j] = K[j, i] = k(samples[i], samples[j])
    return intdiv_K(K, q=q, p=p)

The input variable elems should be named samples.