Learn R Programming

StatRank (version 0.0.6)

KL: Calculates KL Divergence between non-diagonal entries of two matrices

Description

Calculates KL Divergence between non-diagonal entries of two matrices

Usage

KL(A, B)

Arguments

A
first matrix, this is the "true" distribution
B
second matrix, this is the "estimated" distribution

Value

KL divergence

Examples

Run this code
KL(matrix(runif(25), nrow=5), matrix(runif(25), nrow=5))

Run the code above in your browser using DataLab