infoGain: Calculates Information Gain (2-way Interaction Gain) of a...

Description Usage Arguments Value Examples

Description

InfoGAIN = H(S) - H(S|X), where H(S) is the difference in the Shannon's entropy of the system S before a new attribute X is introduced, and H(S|X) is the entropy of the system after the attribute X has been introduced.

Usage

1
infoGain(df, inAtt, classAtt)

Arguments

df

A discrete data.frame

inAtt

An input column of the data.frame df (string)

classAtt

A class column of the data.frame df (string)

Value

The Information Gain of df on the class attribute classAtt

Examples

1
2
3
infoGain(golf, "Windy", "Play")

infoGain(golf, "Outlook", "Play")

integr documentation built on May 24, 2019, 5:06 p.m.