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.
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.