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 = NULL, sp_order = NULL)

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 NULL.

sp_order

An integer specifying the spline order. Must be less than 'bin'. Default is NULL.

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 May 26, 2026, 5:06 p.m.