]> code.communitydata.science - cdsc_reddit.git/blobdiff - term_cosine_similarity.py
bugfix in completing tfidf similarity matrices.
[cdsc_reddit.git] / term_cosine_similarity.py
index f4f1c6edf76e33bbb41fc74a1de207a8390dca9e..48132a83649c8271cade025913c0bbcc2bac72e7 100644 (file)
@@ -71,8 +71,8 @@ https://stanford.edu/~rezab/papers/dimsum.pdf. If similarity_threshold=0 we get
     similarities = similarities.join(df, on='j')
     similarities = similarities.rename(columns={'subreddit':"subreddit_j"})
 
-    similarities.write_feather(output_feather)
-    similarities.write_csv(output_csv)
+    similarities.to_feather(output_feather)
+    similarities.to_csv(output_csv)
     return similarities
     
 if __name__ == '__main__':

Community Data Science Collective || Want to submit a patch?