powered by
Kullback-Leibler Divergence (Cross-entropy)
divergence(x, y, type = c("Kullback-Leibler", "cross-entropy"))
single value vector with divergence statistic
a vector of integer values, defining observed
a vector of integer values, defining estimates
Type of divergence statistic c("Kullback-Leibler", "cross-entropy")
Jeffrey S. Evans <jeffrey_evans@tnc.org>
x <- round(runif(10,1,4),0) y <- round(runif(10,1,4),0) divergence(x, y) divergence(x, y, type = "cross-entropy")
Run the code above in your browser using DataLab