kl: Kullback-Leibler Divergence

View source: R/entropy.R

klR Documentation

Kullback-Leibler Divergence

Description

Get the KL Divergence between two discrete distributions

Usage

kl(x, y, ...)

## Default S3 method:
kl(x, y, ...)

## S3 method for class 'tables'
kl(x, y, ...)

Arguments

x, y

vectors (of probabilities)

...

other arguments to methods

Value

a numberic value, vector or matrix of KL-divergences.

Methods (by class)

  • kl(default): Default method for vectors

  • kl(tables): Method for tables object


rje42/contingency documentation built on Sept. 9, 2024, 6:32 p.m.