Compare two distributions (e.g. two frequency spectra) by computing the ItakuroSaito distance
1  itakura.dist(spec1, spec2, scale=FALSE)

spec1 
any distribution, especially a spectrum obtained with 
spec2 
any distribution, especially a spectrum obtained with

scale 
a logical, if 
The ItakuraSaito (IS) distance is a
nonsymmetric measure of the difference between two probability
distributions. It is here adapted for frequency spectra. The distance
is asymmetric, ie computing the IS distance between spec1 and spec2 is
not the same as computing it between spec2 and spec1. A symmetry can be
obtained by calculating the mean between the two directions.
The distance is obtained following:
D(spec1  spec2) = sum(spec1/spec2  log(spec1/spec2)  1)
The function returns a list of three items:
D1 
The IS distance of 'spec2' with respect to 'spec1' (i.e. D(spec1  spec2)) 
D2 
The IS distance of 'spec1' with respect to 'spec2' (i.e. D(spec2  spec1)) 
D 
The symmetric distance (i.e. D = 0.5*(D1+D2)) 
If scale = TRUE
the distance is divided by the length of spec1
(or spec2
).
The function works for both Hz and (htk)mel scales.
Jerome Sueur, improved by Laurent Lellouch
kl.dist
, ks.dist
, logspec.dist
, simspec
, diffspec
1 2 3 4 5 6 
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.