Skip to content

[MRG] Issue 1453: MDS fall back to SVD when possible - #4485

Closed
NelleV wants to merge 3 commits into
scikit-learn:mainfrom
NelleV:mds
Closed

NelleV wants to merge 3 commits into
scikit-learn:mainfrom
NelleV:mds

Conversation

@NelleV

@NelleV NelleV commented Apr 2, 2015

Copy link
Copy Markdown
Member

This is a follow up on PR #3141.

I've fixed most of @ogrisel's comment.

@landscape-bot

Copy link
Copy Markdown

Code Health
Repository health increased by 0.00% when pulling 2529eb3 on NelleV:mds into 6e54079 on scikit-learn:master.

@landscape-bot

Copy link
Copy Markdown

Code Health
Repository health increased by 0.00% when pulling a7cd7cb on NelleV:mds into 6e54079 on scikit-learn:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 95.13% when pulling a7cd7cb on NelleV:mds into 6e54079 on scikit-learn:master.

@landscape-bot

Copy link
Copy Markdown

Code Health
Repository health increased by 0.00% when pulling 8f59b23 on NelleV:mds into 6e54079 on scikit-learn:master.

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 95.13% when pulling 8f59b23 on NelleV:mds into 6e54079 on scikit-learn:master.

- check_arrays was deprecated. Changed to check_array
- eigenvalue is now done using scipy.sparse.linalg, thus allowing to retreive
  only the k largest eigenvalues and vectors
- uses sklearn.metrics.euclidean_distances when possible
@NelleV

NelleV commented Apr 2, 2015

Copy link
Copy Markdown
Member Author

@GaelVaroquaux @ogrisel I think this is ready.

Comment thread sklearn/manifold/mds.py

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to switch the default to svd: it solves the exact problem, and should be much faster.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. Can you do a quick benchmark?

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage increased (+0.01%) to 95.13% when pulling bf04a74 on NelleV:mds into 1c33a6f on scikit-learn:master.

@NelleV NelleV changed the title Issue 1453: MDS fall back to SVD when possible [MRG] Issue 1453: MDS fall back to SVD when possible Apr 2, 2015
Comment thread sklearn/manifold/mds.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a squared parameter to euclidean_distances.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change that, by the way?

@webdrone

Copy link
Copy Markdown

Hello,

I'm sort of picking up the various threads of this MDS problem extending back into the years... so apologies for the many comments everywhere.

Is there any plan of merging this so that I can add a transform method to the SVD version, which is amenable to it? If you merge it I will be able to change #6222 in accordance to this rather than re-engineering with an extensible option.

Edit: the eigen-decomposition could also be using linalg.eigsh since the matrix will be PSD and symmetric.

@amueller

amueller commented Oct 7, 2016

Copy link
Copy Markdown
Member

@NelleV given your recent activity, do you want to pick up this one?

@amueller

Copy link
Copy Markdown
Member

moving to 0.21

@amueller amueller modified the milestones: 0.20, 0.21 Jul 16, 2018
@jnothman

Copy link
Copy Markdown
Member

Would be nice if someone could pick this up.

@jnothman jnothman modified the milestones: 0.21, 0.22 Apr 16, 2019
@amueller amueller modified the milestones: 0.22, 0.23 Oct 17, 2019
@adrinjalali

Copy link
Copy Markdown
Member

removing from the milestone.

@adrinjalali adrinjalali removed this from the 0.23 milestone Apr 21, 2020
Base automatically changed from master to main January 22, 2021 10:48
@thomasjpfan thomasjpfan added the Superseded PR has been replace by a newer PR label Jul 21, 2022
@thomasjpfan

Copy link
Copy Markdown
Member

I am closing this PR, because it is superseded by #22330. Thank you for working on this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.