entropy: Calculates Shannon's entropy

Description Usage Arguments Value Examples

Description

Formula: H(S) = -P_i * ∑ log_2 * P_i, where P_i is the probability of the corresponding i-th class

Usage

1
entropy(df, classAtt)

Arguments

df

A discrete data.frame

classAtt

A class column of the df (string)

Value

The Shannon's entropy of the df, based on the classAtt attribute

Examples

1
entropy(golf, "Play")

peleplay/integr documentation built on June 1, 2019, 8:16 p.m.