umapr seed issue: cannot be used to seed a numpy.random.RandomState instance
mhimanshu11 opened this issue · 1 comments
mhimanshu11 commented
Hi,
I am using the r wrapper function of UMAP, with all the requirements satisfied but unfortunately I cannot set the seed into the umapr function.
e.g. umapr::umap(iris[,1:4], n_neighbors = 5, random_state = 4), I always ran into the following error
Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: 4.0 cannot be used to seed a numpy.random.RandomState instance
However, if I remove the random_state parameter, its working fine but not reproducible, could you please suggest what could be the reason behind it and any help in solving the error?
Thank you,
Himanshu
seaaan commented
Hi, I will try to look into this more later, but my first guess is that
Python is looking for an integer value but not getting that from R. Try
random_state = 4L to force the 4 to be an integer.
You might also check out two other packages, as described on the github
README page:
Recently, two new UMAP R packages have appeared. These new packages provide
more features than umapr does and they are more actively developed. These
packages are:
-
umap <https://github.com/tkonopka/umap>, which provides the same Python
wrapping function as umapr and also an R implementation, removing the
need for the Python version to be installed. It is available on CRAN
<https://cran.r-project.org/web/packages/umap/index.html>.
-
uwot <https://github.com/jlmelville/uwot>, which also provides an R
implementation, removing the need for the Python version to be installed.
…On Mon, Aug 13, 2018 at 7:57 AM mhimanshu11 ***@***.***> wrote:
Hi,
I am using the r wrapper function of UMAP, with all the requirements
satisfied but unfortunately I cannot set the seed into the umapr function.
e.g. umapr::umap(iris[,1:4], n_neighbors = 5, random_state = 4), I always
ran into the following error
Error in py_call_impl(callable, dots$args, dots$keywords) :
ValueError: 4.0 cannot be used to seed a numpy.random.RandomState instance
However, if I remove the random_state parameter, its working fine but not
reproducible, could you please suggest what could be the reason behind it
and any help in solving the error?
Thank you,
Himanshu
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AKDNdayn0-37aM-5i2d8VuJGbLf_H_tHks5uQZPwgaJpZM4V6qpQ>
.