Skip to main content
Project Logo

Adaptive Experimentation Platform

Why Ax?Get startedTutorials

Key Features

Modular

Modular

Easy to plug in new algorithms and use the library across different domains.

Supports A/B Tests

Supports A/B Tests

Field experiments require a range of considerations beyond standard optimization problems.

Production-Ready

Production-Ready

Support for industry-grade experimentation and optimization management, including MySQL storage.

Get Started

  1. Install Ax:
    pip3 install ax-platform
  2. Run an optimization:


    >>> from ax import *

    >>> client = Client()
    >>> client.configure_experiment(
    experiment_config=ExperimentConfig(
    name="booth_function",
    parameters=[
    RangeParameterConfig(
    name="x1",
    bounds=(-10.0, 10.0),
    parameter_type=ParameterType.FLOAT,
    ),
    RangeParameterConfig(
    name="x2",
    bounds=(-10.0, 10.0),
    parameter_type=ParameterType.FLOAT,
    ),
    ],
    )
    )
    >>> client.configure_optimization(objective="-1 * booth")

    >>> for _ in range(20):
    >>> for trial_index, parameters in client.get_next_trials(max_trials=1).items():
    >>> client.complete_trial(
    >>> trial_index=trial_index,
    >>> raw_data={
    >>> "booth": (parameters["x1"] + 2 * parameters["x2"] - 7) ** 2
    >>> + (2 * parameters["x1"] + parameters["x2"] - 5) ** 2
    >>> },
    >>> )

    >>> client.get_best_parameterization()
    {'x1': 1.02, 'x2': 2.97} # true min is (1, 3)