lmcinnes / lmcinnes/umap

ValueError: Precomputed metric requires shape (n_queries, n_indexed). Dear lmcinnes sir kindly help me.

Open
#157 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
8.3k
Forks
871
Avg merge
1d 13h
Merged PRs (30d)
5

Description

# Applying Kernel PCA
from sklearn.decomposition import KernelPCA
kpca=KernelPCA(n_components=2,kernel='precomputed')
X_train=kpca.fit_transform(X_train)
X_test=kpca.transform(X_test)

Getting Error while executing with KDD CUP Data set .kindly give solution for this Error.
Dear lmcinnes sir kindly help me as early as possible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported KernelPCA setup and the KDD CUP dataset, then trace the fit_transform and transform calls that produce the precomputed-metric shape error. Compare the shapes of X_train and X_test against the error message and confirm the expected input shape before deciding whether the issue belongs in UMAP or in scikit-learn usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, scikit-learn
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.