Skip to content

Commit

Permalink
Merge pull request #62 from bstienen/fix-turbo
Browse files Browse the repository at this point in the history
Remove double function inversion from turbo interface
  • Loading branch information
bstienen committed Dec 24, 2020
2 parents 7884d58 + 86447c0 commit 5326938
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 2 additions & 0 deletions high_dimensional_sampling/functions.py
Expand Up @@ -1663,6 +1663,7 @@ def __init__(self, *args, **kwargs):
# Limit sampling between these hard borders, in order to ALWAYS remain
# within the training box.
ranges = []

x_min = [
-7.16775760e+03, 4.27547804e+05, -9.98192815e+07, -6.81824964e+07,
-9.99995488e+03, -9.99999903e+03, 3.00597043e+00, 1.71060011e+02,
Expand All @@ -1673,6 +1674,7 @@ def __init__(self, *args, **kwargs):
9.99987623e+03, 9.99999881e+03, 6.99999394e+01, 1.75619963e+02,
1.20299997e-01, 7.99999435e-01, 6.69997800e+01, 8.49983345e+01
]

for i in range(len(x_min)):
ranges.append([x_min[i], x_max[i]])
self.ranges = ranges
Expand Down
7 changes: 0 additions & 7 deletions high_dimensional_sampling/optimisation/turbo.py
Expand Up @@ -44,13 +44,6 @@ def __call__(self, function):
elif self.bounds[i][j] == float('-inf'):
self.bounds[i][j] = self.min_int

if function.inverted:

def func(function):
return -function

function = func

turbo_m = TurboM(
f=function, # Handle to objective function
lb=np.array(self.bounds[:, 0]), # Numpy array specifying
Expand Down

0 comments on commit 5326938

Please sign in to comment.