Description Usage Arguments Value Examples
View source: R/rSparseWeightMatrix.R
Generate weight matrix
1 2 | rSparseWeightMatrix(nb.samp, nb.arch, sparse.coeff = max(nb.samp,
nb.arch)/(nb.samp * nb.arch))
|
nb.samp |
An integer that is the number of samples (number of rows). |
nb.arch |
An integer that is the number of archetypes (number of columns). |
sparse.coeff |
A numeric in [0,1] that control the sparsity by rows (the proportion of non-zero entries among all matrix entries). |
A matrix of weights (each row sums to one).
1 | W <- rSparseWeightMatrix(nb.samp=10L, nb.arch=7L, sparse.coeff=0.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.