infoGain {integr}R Documentation

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

Description

InfoGAIN=H(S)H(SX)InfoGAIN = H(S) - H(S|X), where H(S)H(S) is the difference in the Shannon's entropy of the system SS before a new attribute XX is introduced, and H(SX)H(S|X) is the entropy of the system after the attribute XX 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]