INNER CODE UNIT · Python

xtie

linzhiqiu/t2v_metrics · dataset.py:128

    xtie = xtie_only + tie_both
    ytie = ytie_only + tie_both
    tot = con + dis + xtie_only + ytie_only + tie_both

    if variant in ['b', 'c'] and (xtie == tot or ytie == tot):
        return np.nan, 0

    if variant == 'b':
        tau = (con - dis) / np.sqrt(tot - xtie) / np.sqrt(tot - ytie)
    elif variant == 'c':
        minclasses = min(len(set(x)), len(set(y)))
        tau = 2 * (con - dis) / (size**2 * (minclasses - 1) / minclasses)
    elif variant == '23':
        tau = (con + tie_both - dis - xtie_only - ytie_only) / tot
    elif variant == 'acc23':
        tau = (con + tie_both) / tot
    else:
        raise ValueError(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…