[Newbie ] How to use recommend
Opened this issue · 1 comments
lesshaste commented
Thank you for writing humpday, it looks amazing. I tried out the following:
from math import cos, pi
def rastrigin(a, b):
A = 10
n = 2
value = -(A*n + sum([(x**2 - A*cos(2*pi*x)) for x in (a,b)]))
return value
from humpday import recommend
def my_objective(u):
return rastrigin(u[0], u[1])
recommendations = recommend(my_objective, n_dim=2, n_trials=1000)
recommendations now gives me [(None, None, 'scipy_powell_cube')]
However using lipo
, for example, which I think is included with !pip install humpday[full]
the function can be efficiently optimized.
What am I doing wrong?
microprediction commented
Try
pip install humpday[full]
or manually pip install lots of optimizers. It's probably only got scipy to use right now.
Let me know how it goes I'll fix it if broken.