lmcinnes / umap

Uniform Manifold Approximation and Projection
BSD 3-Clause "New" or "Revised" License
7.45k stars 808 forks source link

Transforming new data with fitted embedder not supported for densMAP #834

Open JaKluge opened 2 years ago

JaKluge commented 2 years ago

Hi,

I think the example 'Supervised DensMAP on the Galaxy10SDSS dataset' is a bit misleading and should be adjusted. If I understand correctly, for densMAP it is not yet possible to project new data onto a learned embedding. Applying embedder.transform() on new data should give the error 'Transforming data into an existing embedding not supported for densMAP'.

In this very example, this only works because X_train and X_test are identical, hence they appear with the same object hash in the transform method. Therefore, embedder.transform(X_test) doesn't give the error and will result in the same thing as embedder.transform(X_train) would result in. Both only transform the data on which the embedder was previously fitted, and do not transform new data.

I hope this will be possible with densMAP in the future, but for now, this example is misleading.

Magikzigo commented 2 years ago

Agree with you, I ran into the same issue.

maganino commented 1 year ago

Same here, is there any update/work around on that?