This functions minimises |x-udv'|2 s.t. sum(abs(u))<sumabs[1], sum(abs(v))<sumabs[2], norm(u,2)=norm(v,2) = 1 with respect to u and v.
1 | pen_nipals(x, sumabs = sqrt(c(nrow(x), ncol(x))), niter = 100)
|
x |
a n by p dataset |
sumabs |
1 by 2 vector ofL1 contraint on u and v respectively |
niter |
= 100 (default) number of iterations |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.