(data, attr1, attr2)
return 2 * ig / (_entropy(cont) + _entropy(cont.T))
Symmetrical uncertainty, Press et al., 1988.
Symmetrical uncertainty, Press et al., 1988.
Symmetrical uncertainty Press et al . 1988 .
def _symmetrical_uncertainty(data, attr1, attr2):
    """Symmetrical uncertainty, Press et al., 1988."""
    cont = np.asarray(contingency.Discrete(data, attr1, attr2), dtype=float)
    ig = InfoGain().from_contingency(cont, 1)
    return 2 * ig / (_entropy(cont) + _entropy(cont.T))
def _symmetrical_uncertainty ( data , attr1 , attr2 ) : cont = np . asarray ( contingency . Discrete ( data , attr1 , attr2 ) , dtype = float ) ig = InfoGain ( ) . from_contingency ( cont , 1 ) return 2 * ig / ( _entropy ( cont ) + _entropy ( cont . T ) )