Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differences with Python version? #13

Closed
slagtermaarten opened this issue Apr 17, 2020 · 4 comments
Closed

Differences with Python version? #13

slagtermaarten opened this issue Apr 17, 2020 · 4 comments

Comments

@slagtermaarten
Copy link

Hi,
Thanks for developing this package first and foremost!
My data look intuitive and nice using your version in R, but when I try to reproduce these results in Python using McInnes' version, weirdly enough no structure whatsoever is apparent in the data.
I compared the parameter settings and all the similarly named parameters are identical. Do you know how to best approximate the default settings of your version in Python?
Thanks! Maarten

@tkonopka
Copy link
Owner

Hi Maarten

That seems odd. To answer the question about synchronizing the parameters - the object 'umap.defaults' has all the arguments and values. The argument names match with those in umap-learn, so you can construct a python command setting the arguments one by one. But it sounds you have done that already.

The python group released a new version of umap-learn recently. I haven't checked yet how well the R package interfaces with that. It's a to-do item and I'll update if necessary. Curious, what version are you using?

(You closed this now - did you manage to resolve it?)

@slagtermaarten
Copy link
Author

Thanks for your message! I made an embarrassing mistake in transferring the raw data over from R to python: the sample annotation got shuffled during a data merging step and as such samples were not correctly labeled in python's UMAP plot. I finally figured out that this was the problem after having painstakingly checked all other steps (was assuming my rusty python skills were the source of the problem). The UMAPs looks highly similar now, just rotated about 90 degrees from each other.

@slagtermaarten
Copy link
Author

To quantitate the semblance between the two implementations on my data, I combined the 4 coordinate axes (2 from each UMAP) into one matrix and did a PCA on this matrix. I found the first two PCs to describe over 99% of all variance, consistent with rotational symmetry.

@tkonopka
Copy link
Owner

Glad it worked out. Good luck with your analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants