Description Usage Arguments Value Note References See Also Examples
View source: R/kl_divergence.R
Computes Kullback-Leibler divergence between features and target vector.
1 | calc_kl(feature, target, len_target, pos_target)
|
feature |
feature vector. |
target |
target. |
len_target |
length of the target vector. |
pos_target |
number of positive cases in the target vector. |
A numeric
vector of length 1 representing Kullback-Leibler divergence
value.
Both target
and features
must be binary, i.e. contain only 0
and 1 values.
The function was designed to be as fast as possible subroutine of
calc_criterion
and might be cumbersome if directly called by a user.
Kullback S, Leibler RA On information and sufficiency. Annals of Mathematical Statistics 22 (1):79-86, 1951.
test_features
.
Kullback-Leibler divergence is calculated using KL.plugin
.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.