Description Usage Arguments Details Value Examples
Use one of two schemes to generate simulated data suitable for testing factorization.
1 2 | simulate_data(nfeatures, nsamples, generate.factors = FALSE,
nfactor = 10, alpha0 = 0.5, shuffle = TRUE)
|
nfeatures |
Number of features |
nsamples |
Vector of sample sizes in each cluster.
Rank |
generate.factors |
Generate factor matrices |
nfactor |
Total RNA count of multinomials for each cluster with
|
alpha0 |
Variance parameter of Dirichlet distribution from which
multinomial probabilities are sampled with
|
shuffle |
Randomly permute rows and columns of count matrix. |
In one scheme (generate.factors = TRUE
), simulated factor
matrices
W
and H
are used to build count data X = WH
.
In the second scheme, factor matrices are not used and X
is
sampled directly from r
(rank requested) sets of
multinomial distributions.
If generate.factors = TRUE
, list of components
w
(basis matrix, nfeatures x rank
),
h
(coefficient matrix, rank x ncells
, where
ncells
is equal to n
, the sum of nsamples
), and
x
, a matrix of Poisson deviates with mean W x H
.
If generate.factors = FALSE
, only the count matrix
x
is in the list.
1 2 3 4 | set.seed(1)
x <- simulate_data(nfeatures=10,nsamples=c(20,20,60,40,30))
s <- scNMFSet(x)
s
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.