def choose_hypothesis
      total = 0
      roll = Kernel.rand( total_weight ) + 1
      hypothesis = nil
      hypotheses.each do |h|
        if roll <= ( total += h.weight )
          hypothesis ||= h
        end
      end
      hypothesis ||= hypotheses.first
      return hypothesis
    end
def choose_hypothesis
      total = 0
      roll = Kernel.rand( total_weight ) + 1
      hypothesis = nil
      hypotheses.each do |h|
        if roll <= ( total += h.weight )
          hypothesis ||= h
        end
      end
      hypothesis ||= hypotheses.first
      return hypothesis
    end
Returns a random hypothesis with weighted probability