Skip to content

Commit

Permalink
In addition to the fix of training_test condition never true for Mult…
Browse files Browse the repository at this point in the history
…i-objective optimization PonyGE#166. This was fixed but not pushed in original commit.
  • Loading branch information
zahidirfan committed Oct 2, 2024
1 parent 4e1b5da commit 471ebe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utilities/stats/file_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def save_best_ind_to_file(stats, ind, end=False, name="best"):
savefile.write("Phenotype:\n" + str(ind.phenotype) + "\n\n")
savefile.write("Genotype:\n" + str(ind.genome) + "\n")
savefile.write("Tree:\n" + str(ind.tree) + "\n")
if hasattr(params['FITNESS_FUNCTION'], "training_test"):
if params["DATASET_TEST"]:
if end:
savefile.write("\nTraining fitness:\n" + str(ind.training_fitness))
savefile.write("\nTest fitness:\n" + str(ind.test_fitness))
Expand Down

0 comments on commit 471ebe7

Please sign in to comment.