Skip to content

Commit

Permalink
clip(*bounds)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohambasu07 committed May 7, 2024
1 parent 4e5dec6 commit 0cf2506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mfpbench/pd1/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def _results_for(
for metric, surrogate in self.surrogates.items():
# We clip as sometimes the surrogate produces negative values
bounds = self.Result.metric_defs[metric].bounds
xs[metric] = surrogate.predict(xs[features]).clip(min=0, max=(bounds[1]))
xs[metric] = surrogate.predict(xs[features]).clip(*bounds)

metrics = list(self.surrogates.keys())
return [dict(r[metrics]) for _, r in xs.iterrows()]
Expand Down

0 comments on commit 0cf2506

Please sign in to comment.