Learn R Programming

pdc (version 1.0.3)

distance: Codebook Dissimliarities

Description

Functions to calculate distances/dissimilarities between codebooks.

Usage

hellingerDistance(x,y) squaredHellingerDistance(x,y) symmetricAlphaDivergence(x,y)

Arguments

x
a codebook
y
a codebook

Value

Returns a numeric dissimilarity between two codebooks.

Details

Note: The symmetric alpha-divergence is proportional to the Squared Hellinger distance, and is the default divergence between codebooks.

See Also

codebook

Examples

Run this code

x <- codebook(c(sin(1:100)),m=3)
y <- codebook(c(sin(1:100*0.1)),m=3)
hellingerDistance(x,y)

Run the code above in your browser using DataLab