Method: Split::Experiment#find_simulated_winner
- Defined in:
- lib/split/experiment.rb
#find_simulated_winner(simulated_cr_hash) ⇒ Object
351 352 353 354 355 356 357 358 359 360 361 |
# File 'lib/split/experiment.rb', line 351 def find_simulated_winner(simulated_cr_hash) # figure out which alternative had the highest simulated conversion rate winning_pair = ["",0.0] simulated_cr_hash.each do |alternative, rate| if rate > winning_pair[1] winning_pair = [alternative, rate] end end winner = winning_pair[0] return winner end |