'computes the probability of a message being spam (Robinson\'s method)
P = 1 - prod(1-p)^(1/n)
Q = 1 - prod(p)^(1/n)
S = (1 + (P-Q)/(P+Q)) / 2
Courtesy of http://christophe.delord.free.fr/en/index.html'

def robinson(self, probs, ignore):

    nth = (1.0 / len(probs))
    P = (1.0 - (reduce(operator.mul, map((lambda p: (1.0 - p[1])), probs), 1.0) ** nth))
    Q = (1.0 - (reduce(operator.mul, map((lambda p: p[1]), probs)) ** nth))
    S = ((P - Q) / (P + Q))
    return ((1 + S) / 2)
