From 97ca2183078b6062c42499a79a2b091ff8d3284e Mon Sep 17 00:00:00 2001 From: Kappes Marques Rodrigo <rodrigo.kappes@student-cs.fr> Date: Wed, 29 Jan 2020 13:51:59 +0100 Subject: [PATCH] added average --- algogenetique.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algogenetique.py b/algogenetique.py index 3c02585..1a0fa83 100644 --- a/algogenetique.py +++ b/algogenetique.py @@ -45,7 +45,7 @@ def main(N,tmax,pmutation, proportion): S2=[individu.score for individu in People.indiv] print("Score final: ",best.score) - + print("Avg:", sum(S2)/len(S2)) plt.subplot(224) plt.hist(S2, range = (0,maximum+10), bins = 20, color = 'blue') @@ -56,7 +56,7 @@ def main(N,tmax,pmutation, proportion): lineList = [line.rstrip('\n') for line in open("plasmid_8k.fasta")] brin = ''.join(lineList[1:]) -best,People = main(200,10,0.01,100) +best,People = main(20,10,0.01,10) test = Traj3D() test.compute(brin, best.table) test.draw("first_plot") -- GitLab