col_mut_info_vec {RcppColMetric} | R Documentation |
Vectorized version of function col_mut_info
Description
This is the vectorized version of col_mut_info
.
Usage
col_mut_info_vec(x, y, args = NULL)
Arguments
x |
List, where each element is an input to |
y |
List, where each element is an input to |
args |
|
Value
List, where each element is an output from col_mut_info
.
Note
Change log:
0.1.0 Xiurui Zhu - Initiate the function.
See Also
col_mut_info
for the non-vectorized version.
Examples
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))
}
}
[Package RcppColMetric version 0.1.0 Index]