KLD.matrix: Continuous version of Kullback-Leibler Distance (KLD)

Description Usage Arguments Details Value Author(s) See Also Examples

Description

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

Usage

1

Arguments

x

n by p matrix or list or an object of a class that extends eSet; if x is an an object of a class that extends eSet (eg ExpressionSet), then the function works against its 'exprs' slot.

...

arguments passed to KLD.matrix:

  • methoduse locfit or density to estimate integrand; default is c("locfit", "density")(i.e. both methods).

  • suppupper and lower limits of the integral; default is NULL in which case the limits of the integral are calculated from the range of the data.

  • subdivisionssubdivisions for the integration; default is 1000.

  • diagif TRUE, then the diagonal of the distance matrix will be displayed; default is FALSE.

  • upperif TRUE, then the upper triangle of the distance matrix will be displayed; default is FALSE.

  • samplefor ExpressionSet methods: if TRUE, then distances are computed between samples, otherwise, they are computed between genes.

Details

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.

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

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

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
           1          2          3          4
2 1.69933357                                 
3 0.94581202 2.61611093                      
4 1.37597719 0.04585085 0.61274916           
5 3.03827280 1.01513012 1.92540909 2.07628655

bioDist documentation built on Nov. 8, 2020, 5:14 p.m.