JSdistVec: JSdistVec

Description Usage Arguments Details Value Note Author(s) References Examples

View source: R/tools.R

Description

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

Usage

1

Arguments

p

A vector of probabilities

q

A vector of probabilities

Details

Should not be called directly by user.

Value

Returns the JS distance as a numeric

Note

None

Author(s)

Loyal A. Goff

References

None

Examples

1
2
3
4
5
6
	p<-sample(1:5000,20)
	q<-sample(1:5000,20)
	p<-makeprobsvec(p)
	q<-makeprobsvec(q)
	JSdistVec(p,q)
	

cummeRbund documentation built on Nov. 8, 2020, 7:53 p.m.