Skip to content

Commit 85ddb2c

Browse files
authored
Update tsne function due to dependency change in nlp.py
The recent update to a dependency removed the need for the 'square_distance' argument in the tsne function, which is used within the calculate_embedding function in the nlp module. This commit updates the tsne function to no longer require the 'square_distance' argument. Fixes scikit-learn#12401
1 parent b8ed3e0 commit 85ddb2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

litstudy/nlp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,6 @@ def calculate_embedding(corpus: Corpus, *, rank=2, svd_dims=50, perplexity=30, s
408408
components = tfidf
409409

410410
model = TSNE(
411-
rank, metric="cosine", square_distances=True, perplexity=perplexity, random_state=seed
411+
rank, metric="cosine", perplexity=perplexity, random_state=seed
412412
)
413413
return model.fit_transform(components)

0 commit comments

Comments
 (0)