bigstatsr
bigstatsr copied to clipboard
Check for variables with no variation
Do it in scaling functions?
This is a problem when using e.g. big_randomSVD()
because it would either stop with error TridiagEigen: eigen decomposition failed
or run for an infinite time.
Reprex:
library(bigstatsr)
X <- FBM(20, 20, init = rnorm(400))
svd <- big_randomSVD(X, big_scale())
X[, 1] <- 0
svd2 <- big_randomSVD(X, big_scale())