Open jlmelville opened 9 months ago
I believe the irlba/Matrix error will only occur if the C code (calling the irlba
function with fastpath = TRUE
) is executed. So master
now contains an attempt to tryCatch
that error and then try again with fastpath = FALSE
. Does it work? It seems to, but I also thought that last time and it still caused a CRAN check error.
I also experimented with just embedding all of IRLBA's R code directly into this package. The embed-irlba branch contains this. Might also work, but it removes the C code entirely so would slow everything down for everyone. Integrating irlba's C code with uwot's C++ is non-trivial so I'm not going to spend time on that for now.
This is not something I can fix in uwot, but just in case people are searching for this, if you see the error:
then if you are able to reinstall the
Matrix
andirlba
packages from source as recommended at https://github.com/bwlewis/irlba/issues/70#issuecomment-1826900769, this will fix the problem.If not, another potential workaround is to install
RSpectra
viainstall.packages("RSpectra")
and it should be used in preference to irlba for the spectral initialization.If you are also using PCA explicitly (e.g.
init = "spca"
orpca = 100
), then the following might work: installbigstatsr
(install.packages("bigstatsr")
) and setpca_method = "bigstatsr"
.For either of these you may need to restart your session and explicitly load them for this to work. I've had mixed experience with it (the install packages are eventually picked up).