pavlin-policar / openTSNE

Extensible, parallel implementations of t-SNE
https://opentsne.rtfd.io
BSD 3-Clause "New" or "Revised" License
1.44k stars 158 forks source link

Transform on BH not preserving settings? #204

Closed tomcsojn closed 2 years ago

tomcsojn commented 2 years ago
Expected behaviour

As mentioned in previous problems. its still possible to target higher dimensions with the BH settings. On those embeddings when trying to transform seems like the optimization switches back to fft by default might be good to have a parameter to set it under transform there?

121

Actual behaviour

After making my 3d embeddings with TSNE(BH) using transform gives back the following error File "/usr/local/lib/python3.8/site-packages/openTSNE/tsne.py", line 805, in transform embedding.optimize( File "/usr/local/lib/python3.8/site-packages/openTSNE/tsne.py", line 382, in optimize error, embedding = embedding.optimizer( File "/usr/local/lib/python3.8/site-packages/openTSNE/tsne.py", line 1693, in __call__ reference_embedding.prepare_interpolation_grid() File "/usr/local/lib/python3.8/site-packages/openTSNE/tsne.py", line 912, in prepare_interpolation_grid raise RuntimeError("Cannot prepare interpolation grid for >2d embeddings") RuntimeError: Cannot prepare interpolation grid for >2d embeddings

pavlin-policar commented 2 years ago

Thanks for reporting this, it seems like we're evaluating the interpolation grid regardless of the approximation scheme. So, it's evaluating the grid, then still using the BH approximation. This should be fixed in #207.