Skip to content

Commit 3f71ec0

Browse files
committed
Support of NSGA-II
1 parent 613efcb commit 3f71ec0

File tree

2 files changed

+5
-24
lines changed

2 files changed

+5
-24
lines changed

pygad/utils/nsga2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def get_non_dominated_set(self, curr_solutions):
6464

6565
def non_dominated_sorting(self, fitness):
6666
"""
67-
Apply the non-dominant sorting over the fitness to create the pareto fronts based on non-dominaned sorting of the solutions.
67+
Apply non-dominant sorting over the fitness to create the pareto fronts based on non-dominaned sorting of the solutions.
6868
6969
Parameters
7070
----------
@@ -114,7 +114,7 @@ def non_dominated_sorting(self, fitness):
114114

115115
def crowding_distance(self, pareto_front, fitness):
116116
"""
117-
Calculate the crowding dstance for all solutions in the current pareto front.
117+
Calculate the crowding distance for all solutions in the current pareto front.
118118
119119
Parameters
120120
----------

pygad/visualize/plot.py

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,13 @@
33
"""
44

55
import numpy
6-
import warnings
76
import matplotlib.pyplot
87
import pygad
98

109
class Plot:
11-
def plot_result(self,
12-
title="PyGAD - Generation vs. Fitness",
13-
xlabel="Generation",
14-
ylabel="Fitness",
15-
linewidth=3,
16-
font_size=14,
17-
plot_type="plot",
18-
color="#64f20c",
19-
save_dir=None):
20-
21-
if not self.suppress_warnings:
22-
warnings.warn("Please use the plot_fitness() method instead of plot_result(). The plot_result() method will be removed in the future.")
23-
24-
return self.plot_fitness(title=title,
25-
xlabel=xlabel,
26-
ylabel=ylabel,
27-
linewidth=linewidth,
28-
font_size=font_size,
29-
plot_type=plot_type,
30-
color=color,
31-
save_dir=save_dir)
10+
11+
def __init__():
12+
pass
3213

3314
def plot_fitness(self,
3415
title="PyGAD - Generation vs. Fitness",

0 commit comments

Comments
 (0)