@@ -66,7 +66,7 @@ def find_extreme_points(self, fitness, ideal_point, epsilon=ASF_EPSILON):
6666 """
6767 For each objective axis, find the solution that best represents the
6868 corner of that axis. This is done by running the Achievement
69- Scalarising Function (ASF) once per axis with a weight vector that
69+ Scalarizing Function (ASF) once per axis with a weight vector that
7070 puts weight 1.0 on the target axis and a tiny weight (epsilon) on
7171 every other axis. The solution with the smallest ASF score wins.
7272
@@ -105,26 +105,26 @@ def compute_intercepts(self, extreme_points, ideal_point, fallback_fitness):
105105 """
106106 Fit a hyperplane through the M extreme points and return the
107107 intercept point on each axis. The result is the point we use to
108- scale every objective to the [0, 1] range during normalisation .
108+ scale every objective to the [0, 1] range during normalization .
109109
110110 The NSGA-III paper define the intercept as the point that
111- normalises to value 1 on its own axis (i.e. each extreme row lands
112- on a simplex corner after normalisation ). The math is:
111+ normalizes to value 1 on its own axis (i.e. each extreme row lands
112+ on a simplex corner after normalization ). The math is:
113113
114114 (extreme_points - ideal_point) @ b = 1
115115 intercepts = ideal_point + 1 / b
116116
117117 When the linear system cannot be solved, when any coefficient is
118118 too close to zero, or when the resulting intercept ends up on the
119119 wrong side of the ideal point, fall back to the worst observed
120- value per objective (the column minimum under maximisation ).
120+ value per objective (the column minimum under maximization ).
121121
122122 Two extra safety steps run after the linear solve:
123123 1. If an intercept value extrapolates past the worst observed
124124 value for that objective, clip it back to the worst value.
125125 2. If the gap between an intercept and the ideal point shrinks
126126 below INTERCEPT_NEAR_ZERO after clipping, replace that
127- intercept with the worst observed value so the normalisation
127+ intercept with the worst observed value so the normalization
128128 denominator stays non-zero.
129129
130130 Parameters
@@ -145,7 +145,7 @@ def compute_intercepts(self, extreme_points, ideal_point, fallback_fitness):
145145 ideal_point = numpy .asarray (ideal_point , dtype = float )
146146 extreme_points = numpy .asarray (extreme_points , dtype = float )
147147 fallback_fitness = numpy .asarray (fallback_fitness , dtype = float )
148- # Worst per objective under maximisation is the column minimum.
148+ # Worst per objective under maximization is the column minimum.
149149 worst_per_objective = fallback_fitness .min (axis = 0 )
150150 translated = extreme_points - ideal_point
151151 try :
@@ -158,8 +158,8 @@ def compute_intercepts(self, extreme_points, ideal_point, fallback_fitness):
158158 if numpy .any (numpy .abs (coefficients ) < INTERCEPT_NEAR_ZERO ):
159159 return worst_per_objective
160160 intercepts = ideal_point + 1.0 / coefficients
161- # Under maximisation a valid intercept sits strictly below the
162- # ideal. If it does not, the normalisation denominator would flip
161+ # Under maximization a valid intercept sits strictly below the
162+ # ideal. If it does not, the normalization denominator would flip
163163 # sign and produce nonsense values.
164164 if numpy .any (intercepts >= ideal_point - INTERCEPT_NEAR_ZERO ):
165165 return worst_per_objective
@@ -188,7 +188,7 @@ def normalise_fitness(self, fitness, ideal_point, intercepts):
188188 Parameters
189189 ----------
190190 fitness : numpy.ndarray
191- The fitness array to normalise .
191+ The fitness array to normalize .
192192 ideal_point : numpy.ndarray
193193 The ideal point.
194194 intercepts : numpy.ndarray
@@ -370,10 +370,10 @@ def nsga3_selection(self, fitness, num_parents):
370370 def _pick_critical_front_survivors (self , accepted_indices , fl_indices ,
371371 fitness , K ):
372372 """
373- Run the NSGA-III normalisation and niching steps on the pool
373+ Run the NSGA-III normalization and niching steps on the pool
374374 P_next U Fl, then ask niching_select for K survivors from Fl.
375375
376- The ideal point, extreme points, intercepts and normalised values
376+ The ideal point, extreme points, intercepts and normalized values
377377 are all computed on the combined pool (accepted plus critical
378378 front) because that is what the NSGA-III paper specifies.
379379 """
@@ -590,6 +590,7 @@ def _enumerate_compositions(num_objectives, num_divisions):
590590 if num_objectives == 1 :
591591 yield [num_divisions ]
592592 return
593+ # 13
593594 for first in range (num_divisions + 1 ):
594595 for rest in _enumerate_compositions (num_objectives - 1 , num_divisions - first ):
595596 yield [first ] + rest
0 commit comments