Getting Started#

Which optimizer should I use?#

For most problems, start with one of these recommendations:

Small search spaces (<100 combinations)

Use GridSearch to exhaustively evaluate all options.

General-purpose optimization

BayesianOptimizer works well for expensive objective functions where you want to minimize evaluations.

Fast, simple problems

HillClimbing or RandomSearch are good starting points.

High-dimensional spaces

Population-based methods like ParticleSwarmOptimizer or EvolutionStrategyOptimizer handle many parameters well.

See Optimizers for detailed guidance on choosing optimizers.

How many iterations do I need?#

This depends on your search space size and objective function:

  • Rule of thumb: Start with n_iter = 10 * number_of_parameters

  • Expensive functions: Use fewer iterations with Bayesian optimization

  • Fast functions: Use more iterations with simpler optimizers

You can monitor progress and stop early if the score plateaus.

Does Hyperactive minimize or maximize?#

Hyperactive maximizes the objective function. If you want to minimize, return the negative of your metric:

def objective(params):
    error = compute_error(params)
    return -error  # Negate to minimize