powered by
Computes the mutual information (MI) between two numeric vectors using the specified number of bins and spline order.
getMI(x_1, x_2, bin = 6, sp_order = 2)
A numeric value representing the mutual information (MI).
A numeric vector representing the first variable.
A numeric vector representing the second variable. Must be the same length as `x_1`.
An integer specifying the number of bins. Default is 6.
An integer specifying the spline order. Must be less than `bin`. Default is 2.
x_1 <- rnorm(100) x_2 <- rnorm(100) getMI(x_1, x_2)
Run the code above in your browser using DataLab