Kullback.Leibler function

Kullback Leibler

Kullback Leibler

Calculates Kullback Leibler divergence for all pairs of the datasets.

Kullback.Leibler(group.data, plot = TRUE, main="Kullback Leibler Divergences", parallel = FALSE, cores = 3)

Arguments

  • group.data: A list where each element is a matrix of taxonomic counts(columns) for each sample(rows).
  • plot: When 'TRUE' a heatmap of the results will also be generated.
  • main: A string to be used as the plots title.
  • parallel: When this is 'TRUE' it allows for parallel calculation of the KL distances. Requires the package doParallel.
  • cores: The number of parallel processes to run if parallel is 'TRUE'.

Returns

A matrix of Kullback Leibler divergence values and a heatmap if plot is TRUE.

References

Kotz S, Johnson N.L (1981) Encyclopedia Of Statistical Sciences

Examples

data(saliva) data(throat) data(tonsils) ### Combine the data sets into a single list group.data <- list(saliva, throat, tonsils) ## Not run: kl <- Kullback.Leibler(group.data) kl ## End(Not run)
  • Maintainer: Berkley Shands
  • License: Apache License (== 2.0)
  • Last published: 2019-08-31

Useful links