powered by
calc_kl(feature, target_b, len_target, pos_target)
as.bit
numeric
test_features
KL.plugin
tar <- sample(0L:1, 100, replace = TRUE) feat <- sample(0L:1, 100, replace = TRUE) library(bit) # used to code vector as bit calc_kl(feat, as.bit(tar), 100, sum(tar))
Run the code above in your browser using DataLab