powered by
Distributed svd
Dsvd(data,K, nk,k)
MSE of Xs,vsvd,Ssvd and kopt.
a real input matrix (or data frame) to be decomposed.
the number of blocks into which variable X is divided.
The number of each blocks.
the desired target rank.
library(matrixcalc) K=20; nk=50; nr=10; p=8; k=4; n=K*nk; data=matrix(c(rnorm((n-nr)*p,0,1),rpois(nr*p,100)),ncol=p) Dsvd(data=data,K=K, nk=nk,k=k)
Run the code above in your browser using DataLab