shannonEntropy: Computes the normalized empirical Shannon Entropy for counts...

View source: R/family_funks.R

shannonEntropyR Documentation

Computes the normalized empirical Shannon Entropy for counts delivered in the argument counts.table. Basis of the log function is natural and normalization is done by division by the maximum entropy log(length(counts.table)) (see Normalized Entropy.

Description

Computes the normalized empirical Shannon Entropy for counts delivered in the argument counts.table. Basis of the log function is natural and normalization is done by division by the maximum entropy log(length(counts.table)) (see Normalized Entropy.

Usage

shannonEntropy(counts.table,
  log.base = getOption("GeneFamilies.entropy.log.base", base::exp(1)))

Arguments

counts.table

result of invoking base::table(count.vector)

log.base

The base of the logarithm. Default is the natural logarithm, getOption('GeneFamilies.entropy.log.base', base::exp(1)).

Value

A numeric value element [0,1], the normalized Shannon Entropy.


asishallab/GeneFamilies documentation built on July 28, 2024, 11:44 a.m.