Better HN
topnewbestaskshowjobs
Log inSign up

tobeyey

19 karma · joined Sep 20, 2023 (3y ago) · 1 submissions

Submissions

comment 3y ago · link · parent

Replacing the NCD

  distances = [(compute_ncd(x1, x), label) for x, _, label in compressed_lengths]
with the Euclidean distance

  distances = [(np.sqrt(np.sum(np.square(x1-x))), label) for x, _, label in compressed_lengths]
gives you +15% test accuracy and saves you a lot of compute.