infoGain {integr}R Documentation

Calculates Information Gain (2-way Interaction Gain) of a discrete data.frame

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

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

infoGain(golf, "Windy", "Play")

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

[Package integr version 1.0.0 Index]