jmschrei / apricot

apricot implements submodular optimization for the purpose of selecting subsets of massive data sets to train machine learning models quickly. See the documentation page: https://apricot-select.readthedocs.io/en/latest/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error in running Example A. Facility Location on MNIST and Fashion-MNIST

DeekshaDixit15 opened this issue · comments

ValueError Traceback (most recent call last)
in
----> 1 X_fashion_umap = UMAP(metric="precomputed").fit_transform(X_fashion_pairwise)

~\Anaconda3\envs\tf\lib\site-packages\umap\umap_.py in fit_transform(self, X, y)
1966 Embedding of the training data in low-dimensional space.
1967 """
-> 1968 self.fit(X, y)
1969 return self.embedding_
1970

~\Anaconda3\envs\tf\lib\site-packages\umap\umap_.py in fit(self, X, y)
1623 self._initial_alpha = self.learning_rate
1624
-> 1625 self._validate_parameters()
1626
1627 if self.verbose:

~\Anaconda3\envs\tf\lib\site-packages\umap\umap_.py in _validate_parameters(self)
1499 elif self.metric == "precomputed":
1500 if self.unique is False:
-> 1501 raise ValueError("unique is poorly defined on a precomputed metric")
1502 warn(
1503 "using precomputed metric; transform will be unavailable for new data and inverse_transform "

ValueError: unique is poorly defined on a precomputed metric

What version of UMAP are you using? I'm using version 0.3.10 and didn't get that error when I just re-ran the notebook.

Thanks for the update. It was a version issue I was initially using version 0.1.1 and also tried 0.4.1. Both of them didn't work. It's working with this particular version.