from matplotlib import pyplot as plt
def mutation_weight_comparision(w_weighted, w_q, operator, framework):
plt.title("weight comparision for {0} by {1}".format(operator, framework))
plt.xlabel("mutation(s)")
plt.ylabel("weight(s)")
x = [x for x in range(42)]
w1_total = sum(w_weighted)
w_weighted_pro = [x / w1_total for x in w_weighted]
plt.plot(x, w_weighted_pro, 'b')
plt.plot(x, w_q, 'g')
plt.show()
def mutation_weight_comparision_with_relation(w_weighted, w_q_1, w_q_2, operator, framework):
plt.title("weight comparision with relation for {0} by {1}".format(operator, framework))
plt.xlabel("mutation(s)")
plt.ylabel("weight(s)")
x = [x for x in range(42)]
w1_total = sum(w_weighted)
w_weighted_pro = [x / w1_total for x in w_weighted]
plt.plot(x, w_weighted_pro, 'b')
plt.plot(x, w_q_1, 'g')
plt.plot(x, w_q_2, 'y')
plt.show()
def weight_convert(w, num):
w_ = [x * num for x in w]
w_sum = sum(w_)
print([x / w_sum for x in w_])
if __name__ == '__main__':
operator = ''
framework = ''
w1 = []
w2 = []
w3 = []
mutation_weight_comparision_with_relation(w1, w2, w3, operator, framework)