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

Error when input data is not of a right-numbered column? #51

Closed
heelarryous opened this issue Feb 26, 2020 · 3 comments
Closed

Error when input data is not of a right-numbered column? #51

heelarryous opened this issue Feb 26, 2020 · 3 comments

Comments

@heelarryous
Copy link

Hi there,
I'm getting a weird error when I try to run umap() with my data:
Error: index size 79464 is not a multiple of vector size 16
After playing around trying to figure out why (iris data was working), I discovered that it has something to do with the number of columns that your input data for umap() is.

As an example, when you eliminate one of the numeric columns of the iris dataset (from 4 to 3), I also get a similar error.

iris_train <- data.table(iris[1:100, 1:3])
iris_test <- data.table(iris[101:150, 1:3])

iris_train_umap <- umap(iris_train, n_components = 3, ret_model = T)
save_uwot(iris_train_umap, "~/iris.uwot")
Warning messages:
1: invalid uid value replaced by that for user 'nobody' 
2: invalid gid value replaced by that for user 'nobody' 
iris_umap = load_uwot("~/iris.uwot")
Error: index size 77420 is not a multiple of vector size 16

iris_test_umap <- umap_transform(iris_test, iris_umap)

Rstudio crashes.

Any help would be appreciated!

@heelarryous
Copy link
Author

Sorry, just to add on to this, if I don't need to save the uwot object, umap_transform() doesn't give error. So there's something about saving the object and trying to re-load it that messes this up.

@jlmelville
Copy link
Owner

This is the same problem as #31.

The current GitHub master should have a fix. It will be in the next version on CRAN (although that is blocked by #50).

There is a potential workaround described in #31, but it is rather fiddly I’m afraid.

@heelarryous
Copy link
Author

oh I'm sorry I must have missed that. Thanks so much, the master repo worked!

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