Get.W
1 | get.W(Zbar, Ybar, flavor_mod = "glmnet")
|
Zbar |
summary of various blocks of ceofficient matrices |
Ybar |
summary of various block of observations library(Matrix) library(dplyr) W <- matrix(round(runif(20*2, 0, 5), 2), nrow=20, ncol=2) W <- W/rowSums(W) H1 <- as.matrix(rSpMatrix(2, 100000, nnz = 10000, rand.x= function(nnz) round(rnorm(nnz, 2, 0.2), 2) )) H2 <- as.matrix(rSpMatrix(2, 1000, nnz = 100, rand.x= function(nnz) round(rnorm(nnz, 2, 0.2), 2) )) H3 <- as.matrix(rSpMatrix(2, 30000, nnz = 1000, rand.x= function(nnz) round(rnorm(nnz, 6, 0.2), 2) )) Y1 <- as.matrix(W Y2 <- as.matrix(W Y3 <- as.matrix(W Ybar <- cbind(Y1, Y2, Y3) Zbar <- cbind(H1, H2, H3) We <- get.W(Zbar, Ybar) |
flavor_mod |
This refers to the mode of resolution of matrix W. The default is "glmnet" else you can choose sparse_lsei,sparse_glmnet or cv_glmnet |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.