lmcinnes / umap

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

How does tranform function work? #799

Open Songweiping opened 2 years ago

Songweiping commented 2 years ago

Hi,

I'm using UMAP on a time-series data for ML purpose. Specifically, I'm training a reducer on the training data, and then transform the test data into the trained space. My question is, does reducer use future data (i.e., x_{>t}) during transforming sample x_t ?

Many thanks!

adilosa commented 2 years ago

IIUC, yes, the entire array passed to transform() works like a 'batch' and the whole batch is optimized together.

Songweiping commented 2 years ago

Thanks for your help! Then there may be some information leakage when appling transform() on time-series data.