Skip to content

Commit

Permalink
Fix bugs in an example
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnebro committed Dec 13, 2024
1 parent d0dcaaa commit f38c057
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
problem=problem,
population_size=100,
offspring_population_size=100,
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables, distribution_index=20),
mutation=PolynomialMutation(probability=1.0 / problem.number_of_variables(), distribution_index=20),
crossover=SBXCrossover(probability=1.0, distribution_index=20),
dominance_comparator=GDominanceComparator(reference_point),
termination_criterion=StoppingByEvaluations(max_evaluations=max_evaluations)
Expand All @@ -38,12 +38,12 @@
front = algorithm.result()

# Plot front
plot_front = Plot(title='Pareto front approximation. Problem: ' + problem.get_name(),
plot_front = Plot(title='Pareto front approximation. Problem: ' + problem.name(),
reference_front=problem.reference_front, axis_labels=problem.obj_labels)
plot_front.plot(front, label=algorithm.label, filename=algorithm.get_name())

# Plot interactive front
plot_front = InteractivePlot(title='Pareto front approximation. Problem: ' + problem.get_name(),
plot_front = InteractivePlot(title='Pareto front approximation. Problem: ' + problem.name(),
reference_front=problem.reference_front, axis_labels=problem.obj_labels)
plot_front.plot(front, label=algorithm.label, filename=algorithm.get_name())

Expand Down
2 changes: 1 addition & 1 deletion src/jmetal/lab/experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def __kolmogorov_smirnov_to_latex(indicator_name: str, test_data: pd.DataFrame,
num_columns = len(algorithms)
columns = algorithms

alignment = "c"
alignment = "c"
col_format = "{}|{}".format(alignment, alignment * num_columns)
column_labels = ["\\textbf{{{0}}}".format(label.replace("_", "\\_")) for label in columns]

Expand Down

0 comments on commit f38c057

Please sign in to comment.