17 lines
465 B
Python
17 lines
465 B
Python
from dlib import find_min_global
|
|
from .random import another_random_cube
|
|
from ..utilities import wrap_untrustworthy, final
|
|
|
|
|
|
def dlib_cube(objective, size, budget):
|
|
if size > 35:
|
|
return another_random_cube(objective, size, budget)
|
|
|
|
_objective = wrap_untrustworthy(objective, budget)
|
|
|
|
def __objective(*args):
|
|
return _objective(list(args))
|
|
|
|
find_min_global(__objective, [0.0] * size, [1.0] * size, budget)
|
|
return _objective(final)
|