def mean
      w = @comparators.collect { |comparator| comparator.weight || 1 }
      @score_set.open_for_reading
      @score_set.each_pair do |id_1, id_2, scores|
        sum = 0
        scores.each do |key, value|
          sum += value * w[key-1]
        end
        mean = sum / @comparators.length.to_f
        if mean >= @threshold
          changed
          notify_observers(id_1, id_2, mean)
        end
      end
      @score_set.close
    end
def mean
      w = @comparators.collect { |comparator| comparator.weight || 1 }
      @score_set.open_for_reading
      @score_set.each_pair do |id_1, id_2, scores|
        sum = 0
        scores.each do |key, value|
          sum += value * w[key-1]
        end
        mean = sum / @comparators.length.to_f
        if mean >= @threshold
          changed
          notify_observers(id_1, id_2, mean)
        end
      end
      @score_set.close
    end
Combine scores for each pair of records via mean, then compare the
 combined score to the threshold. Notify observers if there's a match.