symmetrical_uncertainty {msu} | R Documentation |
Estimating Symmetrical Uncertainty of two categorical variables.
Description
Symmetrical uncertainty (SU) is the product of a normalization of
the information gain (IG
) with
respect to entropy. SU(X,Y) is a value in the range [0,1], where
SU(X,Y) = 0
if X and Y are totally independent and
SU(X,Y) = 1
if X and Y are totally dependent.
Usage
symmetrical_uncertainty(x, y)
SU(x, y)
Arguments
x |
A factor as the represented categorical variable. |
y |
A factor as the represented categorical variable. |
Value
Symmetrical uncertainty estimation based on Sannon
entropy. The result is round
ed to 7 decimal places.
See Also
Examples
# completely predictable
symmetrical_uncertainty(factor(c(0,1,0,1)), factor(c(0,1,0,1)))
# XOR factor variables
symmetrical_uncertainty(factor(c(0,0,1,1)), factor(c(0,1,1,0)))
symmetrical_uncertainty(factor(c(0,1,0,1)), factor(c(0,1,1,0)))
## Not run:
symmetrical_uncertainty(c(0,1,0,1), c(0,1,1,0))
## End(Not run)
[Package msu version 0.0.1 Index]