JSdistVec {cummeRbund} | R Documentation |
Returns the Jensen-Shannon Distance (square root of JS divergence) between two probability vectors.
JSdistVec(p, q)
p |
A vector of probabilities |
q |
A vector of probabilities |
Should not be called directly by user.
Returns the JS distance as a numeric
None
Loyal A. Goff
None
p<-sample(1:5000,20) q<-sample(1:5000,20) p<-makeprobsvec(p) q<-makeprobsvec(q) JSdistVec(p,q)