function ret = Entropy(a,b)
    % Entropy or information gain

    if a == 0
        ret = 0;
    elseif b == 0
        ret = 0;
    else 
        c = a + b;
        ret = -(a/c)*log2(a/c) - (b/c)*log2(b/c);
    end

