svdbip2(x,K,H,r)
The second solution is obtained from the same criterion, but after replacing each xhk by xkh-xkh*vh*vh'-uk*uk'xkh+uk*uk'xkh*vh*vh'. And so on for the successive solutions 1,2,...,r . The biggest number of solutions may be r=inf(pk,qh), when the xkh's are supposed with full rank; then rmax=min([min(K),min(H)]).
When K=p (or H=q, with t(x)), svdcp function is better. When H=q and K=p, it is the usual svd (with squared singular values).
Convergence of algorithm may be not global. So the below proposed initialisation of the algorithm may be not very suitable for some data sets. Several different random initialisations with normed vectors might be considered and the best result then choosen
x<-matrix(runif(200),10,20)
s2<-svdbip2(x,c(3,4,3),c(5,5,10),3);s2$s2
s1<-svdbip(x,c(3,4,3),c(5,5,10),3);s1$s2
Run the code above in your browser using DataLab