powered by
Impute missing values in a matrix
impute_matrix(X, ...)
An imputed version of matrix \(X\)
A matrix with missing values in some entries.
Further arguments for softimpute.
softimpute
This function is based on the softImpute function in its eponymous package.
softImpute
X <- matrix(rnorm(20*100),20) Xmis <- X Xmis[sample(length(Xmis),length(Xmis)/10)] <- NA anyNA(X) anyNA(impute_matrix(Xmis))
Run the code above in your browser using DataLab