8000 Manifold learners are not transformers · Issue #2887 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Manifold learners are not transformers #2887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
larsmans opened this issue Feb 24, 2014 · 7 comments
Closed

Manifold learners are not transformers #2887

larsmans opened this issue Feb 24, 2014 · 7 comments

Comments

@larsmans
Copy link
Member

MDS and SpectralEmbedding are not transformers: they have fit_transform, but no transform. Of these, SpectralEmbedding inherits from TransformerMixin without good cause. Either it should be removed or the class should get a transform method.

Ping @GaelVaroquaux, @kuantkid, @NelleV.

@arjoly
Copy link
Member
arjoly commented Feb 24, 2014

I bump into this issue today when I wanted to make a pipeline with a spectral embedding.

@satra
Copy link
Member
satra commented Feb 24, 2014

same here - i think it would be good to add a transform method to these. they should act no differently from PCA imo.
[noise here - see below]

@jmmcd
Copy link
Contributor
jmmcd commented Feb 24, 2014

This issue comes from my (initially confused) question on Stackoverflow. It would be great to be able to project unseen points into the MDS space, but after thinking about it, I don't think the MDS algorithm can actually do this! Can it? I think it iteratively "moves points around" in the projected space. It doesn't actually represent the transformation.

I suppose there is a possibility to hack it by find a few nearest neighbours of the unseen point in the original space, and sending it to a weighted average of their transforms or something like that. But there would be no justification in MDS theory for that, I think.

@satra
Copy link
Member
satra commented Feb 24, 2014

i see where this is coming from now. indeed for many of these operators one can create a transform for the input data set, but it's not possible to apply that transformation to a different dataset.

so i take back what i said earlier about adding the transform bit - i was indeed thinking the fit_transform process, which they already have.

@GaelVaroquaux
Copy link
Member

same here - i think it would be good to add a transform method to these. they
should act no differently from PCA imo.

But what is the algorithm to transform on new data? I am not sure that I
know of it.

@GaelVaroquaux
Copy link
Member

MDS and SpectralEmbedding are not transformers: they have
fit_transform, but no transform. Of these, SpectralEmbedding inherits
from TransformerMixin without good cause. Either it should be removed
or the class should get a transform method.

Unless we can come up with a principled algorithm to transform new data,
I completely agree with you: SpectralEmbedding should not inherit from
TransformerMixin.

@webdrone
Copy link

I just stumbled upon this -- you can indeed project new points in MDS and other methods.

See
http://papers.nips.cc/paper/2461-out-of-sample-extensions-for-lle-isomap-mds-eigenmaps-and-spectral-clustering.pdf
and different approach:
http://ac.els-cdn.com/S0167947308001515/1-s2.0-S0167947308001515-main.pdf?_tid=357ba41a-a27f-11e5-a496-00000aacb35e&acdnat=1450110474_bec3b2d1b9ef6bf7f99fba265c7f5895
which is subsequently proven to be equivalent to the former one in the single point case, here:
http://www.iub.edu/~stat/files/TR/TR-10-03.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
0