cocoatree.statistics.pairwise.compute_mutual_information_matrix

cocoatree.statistics.pairwise.compute_mutual_information_matrix(sequences, seq_weights=None, freq_regul=0.03, normalize=True)[source]

Compute the mutual information matrix

\[I(X, Y) = \sum_{x,y} p(x, y) \log \frac{p(x, y)}{p(x)p(y)}\]

Arguments

sequences : list of sequences

seq_weightsndarray (nseq), optional, default: None

if None, will compute sequence weights

freq_regul : regularization parameter (default=__freq_regularization_ref)

normalizeboolean, defaultTrue

Whether to normalize the mutual information by the entropy.

Returns

mi_matrixnp.ndarray of shape (nseq, nseq)

the matrix of mutual information

Examples using cocoatree.statistics.pairwise.compute_mutual_information_matrix

Mutual information versus SCA

Mutual information versus SCA