powered by
This function computes the Generalized Jensen-Shannon Divergence of a probability matrix.
gJSD(x, unit = "log2", weights = NULL)
a probability matrix.
a character string specifying the logarithm unit that shall be used to compute distances that depend on log computations.
a numeric vector specifying the weights for each distribution in x.
x
Default: weights = NULL; in this case all distributions are weighted equally.
weights
NULL
The Jensen-Shannon divergence between all possible combinations of comparisons.
Function to compute the Generalized Jensen-Shannon Divergence
KL, H, JSD, CE, JE
KL
H
JSD
CE
JE
# NOT RUN { Prob <- rbind(1:10/sum(1:10), 20:29/sum(20:29), 30:39/sum(30:39)) # compute the Generalized JSD comparing the PS probability matrix gJSD(Prob) # }
Run the code above in your browser using DataLab