get.W: get.W solve equation of W

Description Usage Arguments

View source: R/getW.R

Description

Get.W

Usage

1
get.W(Zbar, Ybar, flavor_mod = "glmnet")

Arguments

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


CNRGH/pintmf documentation built on Feb. 23, 2022, 12:02 a.m.