-
Notifications
You must be signed in to change notification settings - Fork 16
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
Type error in optimize_embedding #22
Comments
Thanks for reporting. That config seems to match the default (a=NA, b=NA, spread=1) so am not sure why you are seeing the warning. Could you confirm that is indeed the configuration, please? It is helpful that you traced to optimize_embedding and that none of the inputs are character, but the root cause doesn't spring to mind. Would you be able to share a minimal example, especially your config settings (see above). And just to be sure, are you using version 0.2.10? Sorry this is not immediately helpful, but let's investigate further. |
Yes, I'm using umap 2.10. Did a little more detective work, and this is what I've found: The umap config settings I'm using (
If you run the two different configs you get:
To reproduce in a minimal example, I'm attaching a
As for why in my initial debug I found So case closed, this is user error on my part. That said, it might be nice for the function to do some type checking early on and throw more verbose error messages about that? |
Thanks for the detailed investigation. Glad you found the root cause and can work around this for now. As you suggest, additional input validation would be useful. Most inputs should be numeric values, apart from 'metric', 'input', 'init', and 'umap_learn_args'. If you'd like to make a PR, I'd be happy to incorporate into a new version! |
When running
umap
, I get the following error:I've traced this to
umap:::optimize_embedding
, but because I don't speak C well I can't follow the.Call
inside any further. I've checked all the arguments that are getting passed on to the C code, though, and none of them are character. The only thing I can see that might be out of place is thatabg = c(NA, NA, 1, 0)
, and I don't know if those NAs are expected.Running
umap
with its default settings does not produce the error; the settings I have are as follows:Is this happening because
a
andb
are NA? The function does warn me thatWhich now that I write this seems suspicious. But
umap.defaults
also hasa
andb
set to NA.The text was updated successfully, but these errors were encountered: