User Guide#

Master Hyperactive’s optimization toolkit. This guide covers core concepts, algorithm selection, and integration with popular ML frameworks.

Tip

New to Hyperactive? Start with Introduction for the fundamentals, then explore Optimizers to choose your algorithm.


How Hyperactive Works#

Hyperactive separates what you optimize from how you optimize it. This design lets you swap algorithms without changing your experiment code.

Hyperactive workflow: Define experiment and search space, choose optimizer, run solve(), get best parameters Hyperactive workflow: Define experiment and search space, choose optimizer, run solve(), get best parameters

Core Concepts#

Every optimization in Hyperactive involves three components:

What to optimize

Experiments

Your objective function that takes parameters and returns a score. Can be a simple function or a built-in ML experiment class.

How to optimize

Optimizers

The algorithm that explores your search space. Choose from 31 algorithms across local search, global search, population methods, and Bayesian approaches.

Where to search

Search Spaces

Parameter ranges defined as Python dictionaries. Supports categorical, integer, and continuous parameters.


Quick Example#

from hyperactive.opt import HillClimbing

# 1. Define what to optimize
def objective(params):
    x, y = params["x"], params["y"]
    return -(x**2 + y**2)  # Minimize x² + y²

# 2. Define where to search
search_space = {
    "x": list(range(-10, 11)),
    "y": list(range(-10, 11)),
}

# 3. Choose how to optimize & run
optimizer = HillClimbing(search_space, n_iter=100, experiment=objective)
best = optimizer.solve()  # Returns {"x": 0, "y": 0}

Guide Sections#

Introduction

Core concepts and architecture. Start here if you’re new.

Introduction
Search Spaces

Best practices for parameter ranges, scaling, and granularity.

Search Spaces
Optimizers

Algorithm selection guide. 31 algorithms across 5 categories.

Optimizers
Experiments

Custom functions and built-in ML experiment classes.

Experiments
Integrations

sklearn, sktime, skpro, and PyTorch Lightning support.

Framework Integrations
Migration (v4 → v5)

Upgrade guide with API changes and new patterns.

Migration Guide (v4→v5)