1
0

debugging: print the shape

This commit is contained in:
Nathan TeBlunthuis 2024-12-28 19:21:24 -08:00
parent c3cce0817e
commit c317ef6475

View File

@ -46,7 +46,9 @@ def _week_similarities(week, simfunc, tfidf_path, term_colname, included_subredd
tfidf_colname='tf_idf' tfidf_colname='tf_idf'
# if the max subreddit id we found is less than the number of subreddit names then we have to fill in 0s # if the max subreddit id we found is less than the number of subreddit names then we have to fill in 0s
mat = csr_matrix((entries[tfidf_colname],(entries[term_id_new]-1, entries.subreddit_id_new-1)),shape=(nterms,subreddit_names.shape[0])) shape = (nterms,subreddit_names.shape[0])
print(shape)
mat = csr_matrix((entries[tfidf_colname],(entries[term_id_new]-1, entries.subreddit_id_new-1)),shape=shape)
print('computing similarities') print('computing similarities')
print(simfunc) print(simfunc)
sims = simfunc(mat) sims = simfunc(mat)