Learn R Programming

conMItion (version 0.2.1)

MImat2matPermu: Permuted Mutual Information Between Two Matrices

Description

Computes the normalized mutual information (MI) between vectors sampled from two matrices normalized by the individual information content. The sampling is done multiple times to generate a distribution.

Usage

MImat2matPermu(
  mat1,
  mat2,
  bin = 6,
  sp_order = 2,
  bulkIdx = 0,
  permutationTimes = 1000,
  seedNum = 99999999
)

Value

A numeric vector of normalized mutual information (MI) values for each permutation.

Arguments

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 dimensions as `mat1`.

bin

An integer specifying the number of bins. Default is 6.

sp_order

An integer specifying the spline order. Must be less than `bin`. Default is 2.

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.

Examples

Run this code
mat1 <- matrix(rnorm(10000), nrow = 100, ncol = 100)
mat2 <- matrix(rnorm(10000), nrow = 100, ncol = 100)
MImat2matPermu(mat1, mat2)

Run the code above in your browser using DataLab