mlexchange / mlex_latent_explorer

Other
0 stars 2 forks source link

Check if the dimension reduction techniques can also be split in "train" and "inference" steps #10

Open taxe10 opened 8 months ago

taxe10 commented 8 months ago

In the use case when data is actively being collected, we may not want to "fit" the dimension reduction technique, but instead use a previous fit to run "inference". Is this possible with PCA and UMAP?

runboj commented 8 months ago

After looking at the documents, yes, both algorithms have an inference capability.

For PCA, we can use the fit_transform() function on new data (https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html,).

For UMAP, we can use the transform function (test_embedding = trans.transform(X_test)) on new data (https://umap-learn.readthedocs.io/en/latest/transform.html).