Skip to content

Commit

Permalink
fix: Fixed GA_Reversed plot
Browse files Browse the repository at this point in the history
  • Loading branch information
Agrover112 committed Jun 29, 2021
1 parent c3d6221 commit a07c07d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils.py
Expand Up @@ -87,13 +87,13 @@ def plot_scores(scores, algo_name, save_fig, **kwargs):
'/mnt/d/MINOR PROJECT/final/results/'+"simulated_annealing"+".png"))
else:
plt.show()
elif algo_name == 'genetic_algorithm':
elif algo_name == 'genetic_algorithm' or algo_name == 'genetic_algorithm_reversed':
plt.xlabel("No.of Generations")
plt.ylabel("Objective f(x) Scores")
plt.plot(scores)
if save_fig:
plt.savefig(os.path.join(
'/mnt/d/MINOR PROJECT/final/results/'+"genetic_algorithm"+".png"))
'/mnt/d/MINOR PROJECT/final/results/'+algo_name+".png"))
else:
plt.show()
else:
Expand Down

0 comments on commit a07c07d

Please sign in to comment.