mutual_inf_cc | R Documentation |
Estimate the mutual information MI(X;Y) of the target X
and features Y
where X
and Y
are both continuous using k-nearest neighbor distances.
mutual_inf_cc(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.
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.
Alexander Kraskov, Harald Stögbauer, and Peter Grassberger. Phys. Rev. E 69, 066138 (2004). \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1103/PhysRevE.69.066138")}
data(mutual_info_df)
set.seed(654321)
mutual_inf_cc(mutual_info_df$Yc, t(mutual_info_df$Zc_XcYc))
mutual_inf_cc(mutual_info_df$Xc, t(mutual_info_df$Zc_XcYc), k=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.