...
|
...
|
@@ -86,6 +86,12 @@ The same logic applies for left-multiplication and cross-products.
|
86
|
86
|
This allows us to easily speed up high-level operations involving matrix multiplication by just switching to a `ScaledMatrix`,
|
87
|
87
|
e.g., in approximate PCA algorithms from the `r Biocpkg("BiocSingular")` package.
|
88
|
88
|
|
|
89
|
+```{r}
|
|
90
|
+library(BiocSingular)
|
|
91
|
+set.seed(1000)
|
|
92
|
+system.time(pcs <- runSVD(smat, k=10, BSPARAM=IrlbaParam()))
|
|
93
|
+```
|
|
94
|
+
|
89
|
95
|
# Other utilities
|
90
|
96
|
|
91
|
97
|
Row and column sums are special cases of matrix multiplication and can be computed quickly:
|