HMatrix-methods: H-Matrix (H-Matrix with smallest frobError)

HMatrixR Documentation

H-Matrix (H-Matrix with smallest frobError)

Description

Return a list of H-Matrices or an H-Matrix for the indicaded rank

Usage

HMatrix(x, k = NULL, ...)

## S4 method for signature 'ButchR_NMF'
HMatrix(x, k = NULL, ...)

## S4 method for signature 'ButchR_integrativeNMF'
HMatrix(x, k = NULL, view_id = NULL, type = "all", ...)

## S4 method for signature 'ButchR_joinNMF'
HMatrix(x, k = NULL, ...)

Arguments

x

an object of class ButchR_NMF, ButchR_joinNMF, or ButchR_integrativeNMF.

k

numeric - factorization rank.

...

additional parameters.

view_id

for integrative NMF; character vector with views from which to extract H matrices

type

for integrative NMF; type of H matrix to extract, could be:

  • shared - shared H matrix

  • viewspec - view specific H matrix

  • total - sum of shared H matrix and view specific H matrix.

  • all - shared H matrix and view specific H matrices.

Value

list of H-Matrices or an H-Matrix for the indicaded rank.

Examples

data("leukemia")
nmf_exp <- run_NMF_tensor(leukemia$matrix, ranks = 2,
method = "NMF",
n_initializations = 2)
HMatrix(nmf_exp)
HMatrix(nmf_exp, k = 2)
HMatrix(nmf_exp)
HMatrix(nmf_exp, k = 2)
## Not run: 
# For ButchR_integrativeNMF objects:
# extract H matrices for all factorization ranks
HMatrix(inmf_exp, type = "shared")
HMatrix(inmf_exp, type = "viewspec")
HMatrix(inmf_exp, type = "total")
HMatrix(inmf_exp, type = "all")
# extract H matrices only for selected rank
HMatrix(inmf_exp, k = 2, type = "shared")
HMatrix(inmf_exp, k = 2, type = "viewspec")
HMatrix(inmf_exp, k = 2, type = "total")
HMatrix(inmf_exp, k = 2, type = "all")
# extract H matrices only for selected view and rank
HMatrix(inmf_exp, k = 2, view_id = "atac", type = "viewspec")
HMatrix(inmf_exp, k = 2, view_id = "atac", type = "total")

## End(Not run)

## Not run: 
# For ButchR_joinNMF objects:
HMatrix(jnmf_exp)
HMatrix(jnmf_exp, k = 2)
lapply(HMatrix(jnmf_exp, k = 2), head)
HMatrix(jnmf_exp, k = 2, view_id = "atac")

## End(Not run)

hdsu-bioquant/ButchR documentation built on Jan. 28, 2023, 6:06 p.m.