Hi!
Cool project! If there any plan to implement an inverse op: embedding -> data ? Something like
Thank you!
I have given the issue some thought, and have at least a theoretical back of the envelope sketch of how to do it. I don't have any immediate plans in code right now since there are a number of other items that currently have priority. If you would be interested in implementing it yourself please email me and I can try to outline what would be involved.
Hi!
I would be interested in giving this a look. I would like to try to use this for anomaly detection using the standard transform -> inverse transform reconstruction error.
Thanks @danielnilssonjj . Email me at leland.[email protected] and I can try to sketch the process for you.
Wondering if there has been any progress on this @danielnilssonjj @lmcinnes ?
Yes, if you check the 0.4dev branch you'll find an implementation. It isn't the fastest, but it should work.
Hey guys! I seem to be getting an error when I try to run the inverse_transform on data where the sample size is less than the number of dimensions. Is this expected behavior?
Really appreciate all the great work btw! :)

Thanks for highlighting this. It is good to see people exercising this code. I'll have to dig in and find out what is going on here. I can't promise a quick resolution, but it is definitely important to get this working.
Thanks for highlighting this. It is good to see people exercising this code. I'll have to dig in and find out what is going on here. I can't promise a quick resolution, but it is definitely important to get this working.
Hi, I was wondering if the "inverse_transform" function is disabled.
I was going through the exercise but I can't complete due to the following error:
AttributeError: 'UMAP' object has no attribute 'inverse_transform'
You need the latest version, which is currently on in pre-release. That means it is not the default on PyPI, but can be accessed using the --pre flag. Thus you can do
pip install --pre umap-learn
to install that version.
Hi, I was wondering if the problem stated by @ahsanMah is solved. I'm trying to apply the "inverse_transform" but I'm encountering the same problem:
The data I'm working with has 53 samples of 7168 features (53,7168). Thanks to UMAP, I achieve
to project the data into 2D space. Now I want to create new samples on the 2D space back into the data space, so I'm creating an array of shape (# new samples, 2) but the error above appears when calling "inverse_transform". I think this is due to the same problem as @ahsanMah stated.
I'm using the version "umap-learn==0.4.0rc1".
Thanks in advance, I really appreciate all the work done!
The current master branch has the problem resolved, but no release to PyPI has the fix yet. You can clone from github and install from that and it should work.
Hi all,
It seems that I am experiencing the same issue as @ahsanMah and @paudom witn indexes. It would be so great to make it work for our research. Thanks so much in advance.

The current master branch has the problem resolved, but no release to PyPI has the fix yet. You can clone from github and install from that and it should work.
Hi, thanks for the quick response!
I have downloaded the current master branch and installed UMAP manually as the readme suggests (installing the dependencies and then using setup.py), but the error keeps appearing. Is there something that I'm missing?
Thanks in advance!
I guess the issue which occurs when the number of dimensions in the input data is larger the number of samples is due to the fact that the _min_vertices_ variable is the number of dimensions in the original data. However, the second dimension of _indices_ array is the number of samples in the original data. Therefore, this error happens when _min_vertices_ is larger than _indices.shape(-1)_. Would be more than happy to help but I am not sure what is needed to fix it.

Okay, I'll try to take a look and see if I can figure out the right fix here.
I believe I have a potential fix. I haven't built a reproducer yet, so I can't test right now. If you would like to try with the current master and see if this resolves the issue I would appreciate it.
I believe I have a potential fix. I haven't built a reproducer yet, so I can't test right now. If you would like to try with the current master and see if this resolves the issue I would appreciate it.
Hi, trying the current master branch and installing it manually seems to work.

I have achieved to pass from data with shape (53,7168) to 2D space and then use 3 new samples in the 2D space back into the input space with the output shape of (3,7168).
Thanks a lot for looking into it, I appreciate it! Keep the amazing work! :)
Thanks -- hopefully others can also verify that it is working for them now.
On Thu, Mar 12, 2020 at 11:50 AM paudom notifications@github.com wrote:
I believe I have a potential fix. I haven't built a reproducer yet, so I
can't test right now. If you would like to try with the current master and
see if this resolves the issue I would appreciate it.Hi, trying the current master branch and installing it manually seems to
work.[image: Captura de pantalla 2020-03-12 a las 16 45 44]
https://user-images.githubusercontent.com/37597137/76539450-168b2d00-6481-11ea-9bb5-27105fd9f217.pngI have achieved to pass from data with shape (53,7168) to 2D space and
then use 3 new samples in the 2D space back into the input space with the
output shape of (3,7168).Thanks a lot for looking into it, I appreciate it! Keep the amazing work!
:)—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/lmcinnes/umap/issues/44#issuecomment-598263015, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AC3IUBL2HFSKCQ3O7A252CLRHEADFANCNFSM4ERGGMRA
.
Hi @lmcinnes, I would like to know:
If a data point is projected using UMAP into 2D space and then use the inverse_transform on that same point, should it return the same original datapoint? Or I'm interpreting wrong how the inverse transform should work?
I'm trying to recover datapoints once UMAP has been applied and I haven't been able to do it.
Thanks in advance.


The inverse transform, like the transform, is stochastic in nature. That means that in practice you can't be guaranteed to get the same point back. Ideally you will get a point very close to it.
Most helpful comment
Yes, if you check the 0.4dev branch you'll find an implementation. It isn't the fastest, but it should work.