-def do_clustering(damping, convergence_iter, preference_quantile, name, mat, subreddits, max_iter, outdir:Path, random_state, verbose, alt_mat):
+
+def sim_to_dist(mat):
+ dist = 1-mat
+ dist[dist < 0] = 0
+ np.fill_diagonal(dist,0)
+ return dist
+
+def do_clustering(damping, convergence_iter, preference_quantile, name, mat, subreddits, max_iter, outdir:Path, random_state, verbose, alt_mat, overwrite=False):