hyperactive-project/Hyperactive

A unified interface for optimization algorithms and experiments

What it solves

Hyperactive provides a unified interface for hyperparameter tuning, model selection, and black-box optimization. It solves the problem of having to rewrite experiment code when switching between different optimization algorithms or backends, by separating the definition of the optimization problem (the experiment) from the search strategy (the optimizer).

How it works

The library abstracts the optimization process into three core components:

  1. Optimizer: Implements the search strategy (e.g., Bayesian, Hill Climbing, Particle Swarm).
  2. Search Space: Defines the valid parameter combinations using NumPy arrays or lists.
  3. Experiment: The objective function to be maximized or a built-in experiment wrapper (like SklearnCvExperiment).

It integrates 31 optimization algorithms across three backends: GFO, Optuna, and scikit-learn. This allows users to define an objective and search space once and then swap optimizers freely.

Who it’s for

It is designed for machine learning practitioners and researchers who need to tune hyperparameters for models in frameworks like PyTorch, scikit-learn, sktime, and skpro, or those performing general black-box optimization.

Highlights

  • Unified API: Access 31 different optimization algorithms through a single interface.
  • Backend Flexibility: Supports algorithms from GFO, Optuna, and scikit-learn.
  • ML Framework Integrations: Native support for PyTorch, scikit-learn, sktime, and skpro.
  • Experiment Abstraction: Decouples the objective function from the optimization algorithm for easier experimentation.