MImat2vec: Normalized Mutual Information Between Matrix and Vector

View source: R/ComputeMatrix.R

MImat2vecR Documentation

Normalized Mutual Information Between Matrix and Vector

Description

Computes the normalized mutual information (MI) between each row of a matrix and a numeric vector normalized by the mutual information of the vector with itself using the specified number of bins and spline order.

Usage

MImat2vec(mat, vec, bin = 6, sp_order = 2)

Arguments

mat

A numeric matrix. For example, each row represents a gene and each column represents a sample.

vec

A numeric vector, with length equal to the number of columns in 'mat'.

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.

Value

A numeric vector representing the normalized mutual information (MI) between each row of 'mat' and 'vec'.

Examples

mat <- matrix(rnorm(10000), nrow = 100, ncol = 100)
vec <- rnorm(100)
MImat2vec(mat, vec)


conMItion documentation built on Aug. 8, 2025, 6:25 p.m.