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)

  • default: Default method for vectors

  • tables: Method for tables object


rje42/contingency documentation built on March 6, 2023, 5:16 a.m.