KLD.matrix {bioDist}R Documentation

Continuous version of Kullback-Leibler Distance (KLD)

Description

Calculate KLD by estimating by smoothing log(f(x)/g(x))*f(x) and then integrating.

Usage

KLD.matrix(x, ...) 

Arguments

x n by p matrix or ExpressionSet; if x is an ExpressionSet, then the function works against its 'exprs' slot.
... arguments passed to KLD.matrix:
method
use locfit or density to estimate integrand; default is c("locfit", "density")(i.e. both methods).
supp
upper and lower limits of the integral; default is c(-3, 3).
subdivisions
subdivisions for the integration; default is 1000.
diag
if TRUE, then the diagonal of the distance matrix will be displayed; default is FALSE.
upper
if TRUE, then the upper triangle of the distance matrix will be displayed; default is FALSE.
sample
for ExpressionSet methods: if TRUE, then distances are computed between samples, otherwise, they are computed between genes.

Details

The pairwise distances between the rows of x are computed.

The list method is meant for use when samples sizes are unequal.

Value

An object of class dist with the pairwise, between rows, Kullback-Leibler distances.

Author(s)

Beiying Ding, Vincent Carey

See Also

cor.dist, spearman.dist, tau.dist, dist, KLdist.matrix, mutualInfo

Examples

 x <- matrix(rnorm(100), nrow = 5)
 KLD.matrix(x, method = "locfit", supp = range(x))

[Package bioDist version 1.14.0 Index]