'The observed disagreement for the weighted kappa coefficient.'

def Do_Kw_pairwise(self, cA, cB, max_distance=1.0):

    total = 0.0
    data = (x for x in self.data if (x[u'coder'] in (cA, cB)))
    for (i, itemdata) in self._grouped_data(u'item', data):
        total += self.distance(next(itemdata)[u'labels'], next(itemdata)[u'labels'])
    ret = (total / (len(self.I) * max_distance))
    log.debug(u'Observed    disagreement    between    %s    and    %s:    %f', cA, cB, ret)
    return ret
