saehm / DruidJS

A JavaScript Library for Dimensionality Reduction
107 stars 9 forks source link

FASTMAP and UMAP .transform are not reentrant #5

Open Fil opened 3 years ago

Fil commented 3 years ago
const data = [[0, 0], [1, 1], [2, 1], [2, 2], [1, 2.5]];
const dr = new druid.FASTMAP(data);
dr.transform(); // [[2.828…, 0.707…], [1.414…, 0.707…]…
dr.transform(); // [[0, 0], [0, 0]…

similar issue with UMAP, where the second transform returns "meaningless" values