]> code.communitydata.science - cdsc_reddit.git/blobdiff - similarities/lsi_similarities.py
Merge remote-tracking branch 'refs/remotes/origin/excise_reindex' into excise_reindex
[cdsc_reddit.git] / similarities / lsi_similarities.py
index 565e53fa33a9ae8c5af8062ceb892cbca31226c6..57a2d0d6e25fb27d9a083df63b282ac01ecff9e5 100644 (file)
@@ -21,12 +21,13 @@ from functools import partial
 
 def lsi_similarities(inpath, term_colname, outfile, min_df=None, max_df=None, included_subreddits=None, topN=None, from_date=None, to_date=None, tfidf_colname='tf_idf',n_components=100,n_iter=5,random_state=1968,algorithm='arpack',lsi_model=None):
     print(n_components,flush=True)
 
 def lsi_similarities(inpath, term_colname, outfile, min_df=None, max_df=None, included_subreddits=None, topN=None, from_date=None, to_date=None, tfidf_colname='tf_idf',n_components=100,n_iter=5,random_state=1968,algorithm='arpack',lsi_model=None):
     print(n_components,flush=True)
+
         
     if lsi_model is None:
         if type(n_components) == list:
         
     if lsi_model is None:
         if type(n_components) == list:
-            lsi_model = Path(outfile) / f'{max(n_components)}_{term_colname}s_LSIMOD.pkl'
+            lsi_model = Path(outfile) / f'{max(n_components)}_{term_colname}_LSIMOD.pkl'
         else:
         else:
-            lsi_model = Path(outfile) / f'{n_components}_{term_colname}s_LSIMOD.pkl'
+            lsi_model = Path(outfile) / f'{n_components}_{term_colname}_LSIMOD.pkl'
 
     simfunc = partial(lsi_column_similarities,n_components=n_components,n_iter=n_iter,random_state=random_state,algorithm=algorithm,lsi_model_save=lsi_model)
 
 
     simfunc = partial(lsi_column_similarities,n_components=n_components,n_iter=n_iter,random_state=random_state,algorithm=algorithm,lsi_model_save=lsi_model)
 

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