示例#1
0
def _symmetrical_uncertainty(X, Y):
    """Symmetrical uncertainty, Press et al., 1988."""
    from Orange.preprocess._relieff import contingency_table
    X, Y = np.around(X), np.around(Y)
    cont = contingency_table(X, Y)
    ig = InfoGain().from_contingency(cont, 1)
    return 2 * ig / (_entropy(cont.sum(0)) + _entropy(cont.sum(1)))
示例#2
0
def _symmetrical_uncertainty(X, Y):
    """Symmetrical uncertainty, Press et al., 1988."""
    from Orange.preprocess._relieff import contingency_table
    X, Y = np.around(X), np.around(Y)
    cont = contingency_table(X, Y)
    ig = InfoGain().from_contingency(cont, 1)
    return 2 * ig / (_entropy(cont.sum(0)) + _entropy(cont.sum(1)))