cvxgrp / pymde

Minimum-distortion embedding with PyTorch
https://pymde.org
Apache License 2.0
538 stars 27 forks source link

[Question] Possible to invert embedding? #57

Open pkmital opened 2 years ago

pkmital commented 2 years ago

Hi, thank you for an incredible package! I am interested in visualizing decision boundaries of my high dimensional data as viewed in a lower dimension. In order to do this, I plan to take my high dim data and embed to 2D, and then find an invertible transform that goes from the extents of my 2D data back to the high dimensional data s.t. I can apply my function for discovering the likelihood on the equivalent high dim data.

Is it possible to invert the MDE transform in order to achieve this? For instance, I would have some 2D data that has been embedded w/ MDE and I'd like to map a grid to the extents of this 2D data, then find the equivalent high-dim representation of the grid points w/ the invertible MDE transform?

Any help appreciated! Thanks so much!

akshayka commented 2 years ago

Hey, sorry for the late response!

Embeddings made with PyMDE can't be inverted. You could try some rough heuristics, though. For example, for each grid point you want to "invert", take the 5 nearest embedded points, look up their original high-dimensional representations, and take their average. I'm really not sure how well that would work, but it should definitely do something.