I want cosine nearest neighbors with scikit-learn, but specifying algorithm='kdtree' or 'balltree' with metric='cosine' fails.
Loading page content…

Find answers to your programming questions.
I want cosine nearest neighbors with scikit-learn, but specifying algorithm='kdtree' or 'balltree' with metric='cosine' fails.
I'm comparing a query embedding with my document embeddings using cosinesimilarity and keep getting shape errors.
My dataset has categorical columns like 'city' and 'product type'. Can I use PCA on them?
Code that worked before now fails or prints FutureWarnings about learningrate, init, or niter.
I have class labels. Can UMAP use them to separate the classes better?
Each UMAP run gives a different plot. When I set randomstate, I get a warning and it becomes much slower.
My UMAP plot shows one big blob (or many tiny fragments). Which parameters should I change?
I ran pip install umap and import umap, but umap.UMAP() fails.