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 |
inAtt |
An input column of the data.frame |
classAtt |
A class column of the data.frame |
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]