[2023-07-18 14:42:50,850: ERROR/ForkPoolWorker-3] Task analyze_search_paper[cfd3f3ee-9eeb-447e-8474-187d6a4697a2] raised unexpected: ValueError('perplexity must be less than n_samples')
Traceback (most recent call last):
File "/home/user/miniconda3/envs/pubtrends/lib/python3.10/site-packages/celery/app/trace.py", line 385, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/user/miniconda3/envs/pubtrends/lib/python3.10/site-packages/celery/app/trace.py", line 650, in __protected_call__
return self.run(*args, **kwargs)
File "/home/user/pysrc/celery/tasks_main.py", line 122, in analyze_search_paper
return _analyze_id_list(
File "/home/user/pysrc/celery/tasks_main.py", line 85, in _analyze_id_list
analyzer.analyze_papers(ids, query, topics, test=test, task=task)
File "/home/user/pysrc/papers/analyzer.py", line 155, in analyze_papers
tsne_embeddings_2d = TSNE(n_components=2, random_state=42).fit_transform(self.pca_coords)
File "/home/user/miniconda3/envs/pubtrends/lib/python3.10/site-packages/sklearn/manifold/_t_sne.py", line 1118, in fit_transform
self._check_params_vs_input(X)
File "/home/user/miniconda3/envs/pubtrends/lib/python3.10/site-packages/sklearn/manifold/_t_sne.py", line 829, in _check_params_vs_input
raise ValueError("perplexity must be less than n_samples")
ValueError: perplexity must be less than n_samples