Learn R Programming

praznik (version 11.0.0)

miMatrix: Mutual information matrix

Description

Calculates mutual information between each two features, that is $$I(X_i,X_j).$$

Usage

miMatrix(X, zeroDiag = TRUE, threads = 0)

Arguments

X

Attribute table, given as a data frame with either factors (preferred), booleans, integers (treated as categorical) or reals (which undergo automatic categorisation; see below for details). Single vector will be interpreted as a data.frame with one column. NAs are not allowed.

zeroDiag

Boolean flag, whether the diagonal should be filled with zeroes, or with degenerated scores for two identical copies of a feature.

threads

Number of threads to use; default value, 0, means all available to OpenMP.

Value

A numerical matrix with scores, with row and column names copied from X.

Examples

Run this code
# NOT RUN {
miMatrix(iris)
# }

Run the code above in your browser using DataLab