Learn R Programming

biogram (version 1.0)

calc_ig: Calculate IG of features

Description

Computes information gain between features and target vector.

Usage

calc_ig(target, features)

Arguments

target
target vector.
features
integer matrix of features with number of rows equal to the length of target vector.

Value

  • a integer vector of length equal to the number of features containing computed information gain values.

References

Cover TM, Thomas JA Elements of Information Theory, 2nd Edition Wiley, 2006.

See Also

test_features.

Other implemented criterions. Subroutine used in apply statement in calc_ig: calc_ig_single

Examples

Run this code
calc_ig(sample(0L:1, 100, replace = TRUE), matrix(sample(0L:1, 400, replace = TRUE), ncol = 4))

Run the code above in your browser using DataLab