Exhaustive bench

This commit is contained in:
Yomguithereal 2018-07-11 18:25:03 +02:00
parent 9f13609ad7
commit bfc4241b3e
1 changed files with 8 additions and 0 deletions

View File

@ -77,6 +77,14 @@ with open('./data/musicians.csv', 'r') as f:
clusters = list(quickjoin(artists, distance=levenshtein, radius=2, processes=8))
print('QuickJoin (%i):' % len(clusters), timer() - start)
start = timer()
clusters = list(minhash(artists, radius=0.8, key=lambda x: list(ngrams(5, x)), use_numpy=True))
print('MinHash (%i):' % len(clusters), timer() - start)
start = timer()
clusters = list(jaccard_intersection_index(artists, radius=0.8, key=lambda x: list(ngrams(5, x))))
print('Jaccard Intersection Index (%i):' % len(clusters), timer() - start)
start = timer()
clusters = list(pairwise_fuzzy_clusters(artists, distance=levenshtein, radius=2, processes=8))
print('Parallel Fuzzy clusters (%i):' % len(clusters), timer() - start)