pmi: Pointwise Mutual Information

Description Usage Arguments Value See Also Examples

View source: R/svs.r

Description

A function for computing the pointwise mutual information of every entry in a table.

Usage

1
2
3
pmi(x, normalize = FALSE, base = 2)

PMI(x, normalize = FALSE, base = 2)

Arguments

x

A table (i.e. an object which can be converted to an array).

normalize

Logical indicating whether to normalize the pointwise mutual information.

base

Numeric specification of the base with respect to which logarithms are computed.

Value

An array with the pointwise mutual information of every entry.

See Also

MI.

Examples

1
2
3
4
SndT_Fra <- read.table(system.file("extdata", "SndT_Fra.txt", package = "svs"),
   header = TRUE, sep = "\t", quote = "\"", encoding = "UTF-8")
tab.SndT_Fra <- table(SndT_Fra)
pmi(tab.SndT_Fra)

svs documentation built on May 29, 2017, 10:25 a.m.

Search within the svs package
Search all R packages, documentation and source code