Skip to content

Commit

Permalink
tidy up codes
Browse files Browse the repository at this point in the history
  • Loading branch information
KeitaW committed Mar 9, 2019
1 parent 4705a01 commit ec2de12
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 34 deletions.
1 change: 0 additions & 1 deletion spykesim/editsim.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,6 @@ def _eval_simmat_minhash(_sim, numhash, numband, bandwidth, binarray_csc, INT_C
indices = find_similar(numhash, numband, bandwidth, sigmat, bucket_list, idx1)
indices_list.append(set(indices))
count += len(set(indices))
print(len(set(indices)))
times_list.append([times[idx2] for idx2 in indices])
reduce_rate = (count / (len_times ** 2))
worker = partial(
Expand Down
33 changes: 0 additions & 33 deletions spykesim/minhash.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -132,36 +132,3 @@ def find_similar(numhash, numband, bandwidth, signature_matrix, bucket_list, col
return candidates


#def main():
# # Test with small csc_mat
# mh = MinHash(20, 5)
# size = int(1e+02)
# csc_mat = np.random.randint(0, 1, size=size**2).reshape(size, size)
#
# print("Signature Matrix calculation on CPU starts")
# sm_cpu = generate_signature_matrix(mh, csc_mat, mode="cpu")
# print("Signature Matrix calculated on CPU")
# print(sm_cpu)
# print("Signature Matrix calculation on GPU starts")
# sm_gpu = generate_signature_matrix(mh, data, mode="gpu")
# print("Signature Matrix calculated on GPU")
# print(sm_gpu)
#
# # Performance evaluation with larger data
# import time
# mh = MinHash(20, 5)
# size = int(1e+03)
# data = np.random.randint(0, 1, size=size**2).reshape(size, size)
#
# print("Signature Matrix calculation on CPU starts")
# start_time = time.time()
# sm_cpu = generate_signature_matrix(mh, data, mode="cpu")
# print("--- %s seconds ---" % (time.time() - start_time))
# print("Signature Matrix calculated on CPU")
# print(sm_cpu)
#
#
#
#if __name__ == "__main__":
# # execute only if run as a script
main()

0 comments on commit ec2de12

Please sign in to comment.