View source: R/ComputePermutation.R
| CMImat2matPermu | R Documentation |
Computes the normalized conditional mutual information (CMI) between vectors sampled from two matrices, conditioned on another vector, normalized by the individual information content. The sampling is done multiple times to generate a distribution.
CMImat2matPermu(
mat1,
mat2,
condi,
bin = NULL,
sp_order = NULL,
bulkIdx = 0,
permutationTimes = 1000,
seedNum = 99999999,
permutation_method = c("random", "within_bins")
)
mat1 |
A numeric matrix. For example, each row represents a gene and each column represents a sample. |
mat2 |
Another numeric matrix to compare against. Must have the same columns as 'mat1'. |
condi |
A numeric condition vector, matching the number of columns in 'mat1'. |
bin |
An integer specifying the number of bins. Default is NULL. |
sp_order |
An integer specifying the spline order. Must be less than 'bin'. Default is NULL. |
bulkIdx |
Index to divide the task when processing many permutations. Default is 0. |
permutationTimes |
Number of permutations for sampling. Default is 1000. |
seedNum |
Seed for random number generation. Default is 99999999. |
permutation_method |
A character string specifying the permutation scheme. Use '"random"' for the original random row-column sampling procedure, or '"within_bins"' for conditional permutation within bins of 'condi'. |
A numeric vector of normalized conditional mutual information (CMI) values for each permutation.
mat1 <- matrix(rnorm(10000), nrow = 100, ncol = 100)
mat2 <- matrix(rnorm(10000), nrow = 100, ncol = 100)
condi <- rnorm(100)
CMImat2matPermu(mat1, mat2, condi)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.