scikit-learn / scikit-learn/scikit-learn

sklearn.cluster.bicluster.BaseSpectral._svd: n_discard eigenvectors from svds

Open
#12,863 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug module:cluster
Dominant language
Python
Stars
67.3k
Forks
27.4k
Avg merge
1d 15h
Merged PRs (30d)
58

Description

Description

The function sklearn.cluster.bicluster.BaseSpectral._svd incorrectly uses the parameters svd_method = 'arpack' and n_discard.

The function _svd should discard the eigenvectors with largest eigenvalues, but the function svds used when svd_method=='arpack' returns the eigenvectors with ascending eigenvalues. This behavior is different with that of the function randomized_svd used when svd_method=='randomized'.

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 at sklearn.cluster.bicluster.BaseSpectral._svd and inspect how svd_method='arpack' calls svds versus how 'randomized' calls randomized_svd. Verify the eigenvector ordering and n_discard behavior for both methods; done means the arpack path discards the same intended eigenvectors as the randomized path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.