count = 0 for line in content_reader: for i in range(num_methods): for j in range(MAX_ROBOTS): if i == 1: samples[i][j][count] -= float(line[i+num_methods*j]) count += 1 print count second_level_names = [str(0.1*x) for x in range(1,11)] yticklabels = [str(-5*x) for x in range(6)] fig, ax, rects, means= \ graph.draw_line_graph(samples, ["SingleRobot", "UCT[$u_m$=0]", "UCT[$u_m$=1]"], second_level_names=second_level_names, yticklabels=yticklabels, xlabel='robotSpeed(m/s)', ylabel='Normalized Reward (negated)') # sigs = None # if num_methods == 2: # sigs = [] # for robots in range(MAX_ROBOTS): # sig = graph.is_significant(samples[0][robots], samples[1][robots]) # if sig: # print "For " + str(robots + 1) + " robots, diff is significant" # else: # print "For " + str(robots + 1) + " robots, diff is not significant" # sigs.append(sig) # #attach some text labels
for j in range(MAX_ROBOTS): samples[i].append([]) print 'Reading from file: ' + sys.argv[1] with open(sys.argv[1], 'rb') as csvfile: content_reader = csv.reader(csvfile, delimiter=',') for line in content_reader: for i in range(num_methods): for j in range(MAX_ROBOTS): samples[i][j].append(float(line[i+num_methods*j])) second_level_names = [str(0.1*x) for x in range(1,11)] fig, ax, rects, means= \ graph.draw_line_graph(samples, ["SingleRobot", "UCT[$u_m$=0]", "UCT[$u_m$=1]"], second_level_names=second_level_names, xlabel='robotSpeed (m/s)', ylabel='Normalized Time Taken') # sigs = None # if num_methods == 2: # sigs = [] # for robots in range(MAX_ROBOTS): # sig = graph.is_significant(samples[0][robots], samples[1][robots]) # if sig: # print "For " + str(robots + 1) + " robots, diff is significant" # else: # print "For " + str(robots + 1) + " robots, diff is not significant" # sigs.append(sig) # #attach some text labels