bioDist (version 1.44.0)

KLdist.matriX: Discrete version of Kullback-Leibler Distance (KLD)

Description

Calculate the KLD by binning continuous data.

KL distance is calculated using the formula $$KLD(f_1(x),f_2(x)) = \sum_{i=1}^N{ f_1(x_i)*\log\frac{f_1(x_i)}{f_2(x_i)}}$$

Usage

KLdist.matrix(x, ...)

Arguments

x
n by p matrix or a list or an object of a class that extends eSet. If x is an object of a class derived from eSet (ExpressionSet,SnpSet etc), then the values returned by the exprs function are used.
...
arguments passed to KLdist.matrix: [object Object],[object Object],[object Object],[object Object],[object Object]

Value

  • An object of class dist is returned.

Details

The data are binned, and then the KL distance between the two discrete distributions is computed and used. The distance is computed between rows of the input matrix (except if the input is an object of a class that extends eSet and sample is TRUE.

The presumption is that all samples have the same number of observations. The list method is meant for use when samples sizes are unequal.

See Also

cor.dist, spearman.dist, tau.dist,euc, man,KLD.matrix,mutualInfo

Examples

Run this code
x <- matrix(rnorm(100), nrow = 5)
 KLdist.matrix(x, symmetrize = TRUE)

Run the code above in your browser using DataLab