0

I have 20 parameters that can take binary value which are passed to function to return the score like this.

score = fmin( para 1, para 2 , para 3,.....para20)

Now to optimize this scenario, which can be the best algorithm ?

I read about genetic algorithm where in chromosome can do mutation and crossover to select best combination out of 2^20 search points.

I also read about hyperopt that optimises the function but in less number of trials.

Which can be the better one ? Any pros or cons of using these algorithms ?

Pranav Hosangadi
  • 23,755
  • 7
  • 44
  • 70
  • 1
    How long does it take to evaluate one possible combination? 2^20 isn't that big (around 1 million) and if the evaluation can be done efficiently, you can simply bruteforce to find the best solution. – Tristan Nemoz Sep 03 '20 at 18:50
  • Not sure how you'd find the "best" without iterating the entire search space, or at least narrowing down which set of parameters really gives the best improvements – OneCricketeer Sep 03 '20 at 19:00

1 Answers1

1

It really depends on the properties you expect your function to have. If you have reason to believe that similar parameter sets have similar scores, then you can try simulated annealing or genetic algorithms.

However, if you don't have reason to expect similar parameters will generate similar scores, those methods won't help: you would do just as well picking parameter sets at random. But (as mentioned in the comments), 2^20 isn't much more than a million trials: if your function isn't too expensive, you could just try them all.

comingstorm
  • 25,557
  • 3
  • 43
  • 67