col_mut_info_vec | R Documentation |
This is the vectorized version of col_mut_info
.
col_mut_info_vec(x, y, args = NULL)
x |
List, where each element is an input to |
y |
List, where each element is an input to |
args |
|
List, where each element is an output from col_mut_info
.
Change log:
0.1.0 Xiurui Zhu - Initiate the function.
col_mut_info
for the non-vectorized version.
if (require("MASS", quietly = TRUE) == TRUE) {
data(cats)
print(res_cpp <- col_mut_info_vec(list(round(cats[, 2L:3L])), list(cats[, 1L])))
# Validate with caTools::colAUC()
if ((require("infotheo", quietly = TRUE) == TRUE) &&
(require("magrittr", quietly = TRUE) == TRUE)) {
print(res_r <- sapply(round(cats[, 2L:3L]), infotheo::mutinformation, cats[, 1L]) %>%
{matrix(., nrow = 1L, dimnames = list(NULL, names(.)))})
identical(res_cpp, list(res_r))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.