Learn R Programming

cummeRbund (version 2.14.0)

JSdistVec: JSdistVec

Description

Returns the Jensen-Shannon Distance (square root of JS divergence) between two probability vectors.

Usage

JSdistVec(p, q)

Arguments

p
A vector of probabilities
q
A vector of probabilities

Value

Returns the JS distance as a numeric

Details

Should not be called directly by user.

References

None

Examples

Run this code
	p<-sample(1:5000,20)
	q<-sample(1:5000,20)
	p<-makeprobsvec(p)
	q<-makeprobsvec(q)
	JSdistVec(p,q)
	

Run the code above in your browser using DataLab