Learn R Programming

BayesNetBP (version 1.0.1)

ComputeKLDs: Compute signed and symmetric Kullback-Leibler divergence

Description

Compute signed and symmetric Kullback-Leibler divergence of variables over a spectrum of evidence

Usage

ComputeKLDs(tree, var0, vars, seq, pbar = TRUE)

Arguments

tree

a clustertree object

var0

the variable to have evidence absrobed

vars

the variables to have divergence computed

seq

a vector of numeric values as the evidences

pbar

logical(1) whether to show progress bar

Value

a data.frame of the divergence

Details

Compute signed and symmetric Kullback-Leibler divergence of variables over a spectrum of evidence. The signed and symmetric Kullback-Leibler divergence is also known as Jeffery's signed information (JSI) for continuous variables.

Examples

Run this code
data(toytree)
klds <- ComputeKLDs(tree=toytree, var0="F", 
                    vars=c("A", "B", "C", "D", "E", "H", "G", "J"), 
                    seq=seq(-3,3,0.2))
head(klds)

Run the code above in your browser using DataLab