Skip to content

Commit

Permalink
Fix MultiplFitnessLines for SingleObjFitness
Browse files Browse the repository at this point in the history
  • Loading branch information
YamLyubov committed Dec 6, 2023
1 parent 46b53a4 commit 1077d8d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions golem/visualisation/opt_history/multiple_fitness_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def visualize(self,

def plot_multiple_fitness_lines(self, ax: plt.axis, metric_id: int = 0, with_confidence: bool = True):
for histories, label in zip(list(self.historical_fitnesses.values()), list(self.historical_fitnesses.keys())):
if len(self.metric_names) == 1:
histories = [[gen_fit] for gen_fit in histories]
plot_average_fitness_line_per_generations(ax, histories, label,
with_confidence=with_confidence,
metric_id=metric_id)
Expand Down

0 comments on commit 1077d8d

Please sign in to comment.