entropy_2: Computes the entropy between two variables

Description Usage Arguments Value Examples

View source: R/information_theory.R

Description

It calculates the entropy between two categorical variables using log2. This log2 is mentioned in most of the Claude Shannon bibliography. Input/target can be numeric or character.

Usage

1
entropy_2(input, target)

Arguments

input

numeric/character vector

target

numeric/character vector

Value

Entropy measured in bits

Examples

1
2
3
4
5
## Not run: 
# Measuring entropy between input and target variable
entropy_2(input=data_golf$outlook, target=data_golf$play_golf)

## End(Not run)

funModeling documentation built on July 1, 2020, 5:40 p.m.