From db5b6498acd9310a0849be4abf21ab7b04a979bc Mon Sep 17 00:00:00 2001 From: Dale Wahl Date: Tue, 8 Oct 2024 13:10:50 +0200 Subject: [PATCH] histwords: return on fail --- processors/visualisation/histwords.py | 1 + 1 file changed, 1 insertion(+) diff --git a/processors/visualisation/histwords.py b/processors/visualisation/histwords.py index f6ae05261..7463e9662 100644 --- a/processors/visualisation/histwords.py +++ b/processors/visualisation/histwords.py @@ -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)