Im trying to implemnt a multidimensional hypterparamter optimization. I have a function with many arguments but only 4 which have to be optimzized.
I wonder how i can pass this to hypteropt.
I thoughtg something like this should work in a test function:
from hyperopt import hp, fmin, tpe, Trials
def testFuntion(x,arg1='arg1',arg2='arg2',arg3='arg3'):
print(arg1,arg2,arg3)
#args1,arg2,arg3 = args
return x[0]-x[1]-x[2]+x[3]
space = ((hp.uniform('a', 0.0, 1.0),hp.uniform('b', 0.0, 1.0),hp.uniform('c', 0.0, 1.0)),hp.uniform('d', 0.0, 1.0),'blub1','blub2','blub3')
trials = Trials()
best = fmin(testFuntion, space, algo=tpe.suggest, max_evals=100)
But the function is trying to compare my strings somehow and raises Error: TypeError: unsupported operand type(s) for -: 'tuple' and 'float'
What am i doing wrong?