User Guide#
Tip
New to Surfaces? Start with Introduction for the fundamentals, then explore the Test Functions to see what’s available.
How Surfaces Works#
Surfaces provides a unified interface for optimization test functions. Each function can be evaluated, returns loss or score values, and provides its search space definition.
Call the function
Evaluate at any point using dictionaries, keyword arguments, or numpy arrays.
Loss or Score
Results for minimization (loss) or maximization (score). Same function, both modes.
Parameter bounds
Every function provides a default search space with appropriate bounds.
Guide Sections#
Core concepts and the unified interface. Start here if you’re new to Surfaces.
All function categories: Algebraic, BBOB, CEC, Machine Learning, and Engineering.
Modify test functions with noise and other transformations.
Pre-configured function collections for common benchmarking scenarios.
Use Surfaces with scipy, Optuna, SMAC, Ray Tune, GFO, and Hyperactive.
Plot function surfaces, contours, and optimization trajectories.
Pre-trained models for fast evaluation of expensive ML test functions.
Evaluate ML functions at reduced cost for Hyperband, BOHB and ASHA.
Hardware-independent cost metric for benchmarking optimizer vs eval cost.
Compare optimizers systematically with statistical analysis and CD diagrams.
Quick Example#
from surfaces.test_functions.algebraic import SphereFunction
# 1. Create the function
func = SphereFunction(n_dim=3)
# 2. Evaluate at a point
loss = func({"x0": 1.0, "x1": 2.0, "x2": 3.0}) # 14.0
# 3. Get the search space
space = func.search_space() # {'x0': array(...), ...}