You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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.
Activity
arjoly commentedon Feb 24, 2014
I bump into this issue today when I wanted to make a pipeline with a spectral embedding.
satra commentedon 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 commentedon 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 commentedon 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 commentedon Feb 25, 2014
But what is the algorithm to transform on new data? I am not sure that I
know of it.
GaelVaroquaux commentedon Feb 25, 2014
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 commentedon Dec 14, 2015
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