Skip to content

Commit

Permalink
histwords: return on fail
Browse files Browse the repository at this point in the history
  • Loading branch information
dale-wahl committed Oct 8, 2024
1 parent a269f96 commit db5b649
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions processors/visualisation/histwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ def process(self):
vectors = tsne.fit_transform(vectors)
except ValueError:
self.dataset.finish_with_error("Insufficient data to reduce to 2D. The word embeddings model may be too small to visualise properly.")
return
elif reduction_method == "TruncatedSVD":
# standard sklearn parameters made explicit
svd = TruncatedSVD(n_components=2, algorithm="randomized", n_iter=5, random_state=0)
Expand Down

0 comments on commit db5b649

Please sign in to comment.