mutual_inf_cd | R Documentation |
Estimate the mutual information MI(X;Y) of the target X
and features Y
where X
is continuous or discrete and Y
is discrete using k-nearest neighbor distances.
mutual_inf_cd(target, features, k = 3L)
target |
input vector. |
features |
input vector or matrix. |
k |
Integer number of nearest neighbors. The default value is 3. |
The features argument is a vector of the same size as the target vector, or a matrix whose column dimension matches the size of the target vector. Discrete values for the features or targets must be numeric or integer types.
Returns the estimated mutual information. The return value is a vector of size 1 if the features argument is a vector. If the features argument is a matrix then the return value is a vector whose size matches the number of rows in the matrix.
Ross BC (2014) Mutual Information between Discrete and Continuous Data Sets. PLoS ONE 9(2): e87357. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1371/journal.pone.0087357")}
data(mutual_info_df)
set.seed(654321)
mutual_inf_cd(mutual_info_df$Zc_XdYd, t(mutual_info_df$Xd))
M <- cbind(mutual_info_df$Xd, mutual_info_df$Yd)
mutual_inf_cd(mutual_info_df$Zc_XdYdWd, t(M))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.