Skip to content

Commit 8b46f0e

Browse files
authored
Merge pull request #169 from Ethan-han921/debug/function_minization
Update the evaluator.py in function_minimization
2 parents 64214d3 + 0b8ca98 commit 8b46f0e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/function_minimization/evaluator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,10 @@ def evaluate(program_path):
178178
speed_score = float(1.0 / avg_time) if avg_time > 0 else 0.0
179179

180180
# calculate standard deviation scores
181+
# get x_std_score
181182
x_std_score = float(1.0 / (1.0 + np.std(x_values)))
182-
y_std_score = float(1.0 / (1.0 + np.std(x_values)))
183+
# get y_std_score
184+
y_std_score = float(1.0 / (1.0 + np.std(y_values)))
183185
standard_deviation_score = (x_std_score + y_std_score) / 2.0
184186

185187
# Normalize speed score (so it doesn't dominate)

0 commit comments

Comments
 (0)