{"id":20040770,"url":"https://github.com/simonblanke/surfaces","last_synced_at":"2026-04-18T21:00:37.085Z","repository":{"id":57435698,"uuid":"353451383","full_name":"SimonBlanke/Surfaces","owner":"SimonBlanke","description":"Standardized test-functions for optimization algorithms and machine-learning","archived":false,"fork":false,"pushed_at":"2026-04-18T19:01:04.000Z","size":37826,"stargazers_count":5,"open_issues_count":9,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-04-18T20:35:13.553Z","etag":null,"topics":["bbob","benchmarking","black-box-optimization","cec2013","cec2014","cec2017","engineering","gradient-free-optimization","machine-learning","objective-functions","optimization","python","science","surrogate-models","test-functions"],"latest_commit_sha":null,"homepage":"https://surfaces.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SimonBlanke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-31T18:21:31.000Z","updated_at":"2026-04-18T18:59:57.000Z","dependencies_parsed_at":"2023-12-29T19:23:19.790Z","dependency_job_id":"f492ddc4-565d-4024-b9f1-38f9ebc40262","html_url":"https://github.com/SimonBlanke/Surfaces","commit_stats":{"total_commits":96,"total_committers":2,"mean_commits":48.0,"dds":0.0625,"last_synced_commit":"bb51ab57b8dd584607c2b543e397f2cbd371ca9e"},"previous_names":["simonblanke/gradient-free-objective-functions"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/SimonBlanke/Surfaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonBlanke%2FSurfaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonBlanke%2FSurfaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonBlanke%2FSurfaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonBlanke%2FSurfaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SimonBlanke","download_url":"https://codeload.github.com/SimonBlanke/Surfaces/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SimonBlanke%2FSurfaces/sbom","scorecard":{"id":130088,"data":{"date":"2025-08-11","repo":{"name":"github.com/SimonBlanke/Surfaces","commit":"8adc94872cb2d8db9f13007d14a6b91bd59257f6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'contents' permission set to 'read': .github/workflows/publish_testing_image.yml:15","Warn: jobLevel 'contents' permission set to 'write': .github/workflows/update-ml-parameter-docs.yml:27","Warn: no topLevel permission defined: .github/workflows/generate-plots.yml:1","Warn: no topLevel permission defined: .github/workflows/publish_testing_image.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Warn: no topLevel permission defined: .github/workflows/update-ml-parameter-docs.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-plots.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/generate-plots.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/generate-plots.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/generate-plots.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/generate-plots.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/generate-plots.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish_testing_image.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/publish_testing_image.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish_testing_image.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/publish_testing_image.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/tests.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/tests.yml:51: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/update-ml-parameter-docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/update-ml-parameter-docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:97: update your workflow using https://app.stepsecurity.io/secureworkflow/SimonBlanke/Surfaces/update-ml-parameter-docs.yml/main?enable=pin","Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating python:3.10-slim to python:3.10-slim@sha256:81f1cdb3770d54ecfdbddcc52c2125fce674c14a1d976dfd8f65dc0734f9c3c5","Warn: pipCommand not pinned by hash: Dockerfile:5-7","Warn: pipCommand not pinned by hash: Dockerfile:5-7","Warn: pipCommand not pinned by hash: .github/workflows/generate-plots.yml:41","Warn: pipCommand not pinned by hash: .github/workflows/generate-plots.yml:42","Warn: pipCommand not pinned by hash: .github/workflows/generate-plots.yml:43","Warn: pipCommand not pinned by hash: .github/workflows/generate-plots.yml:44","Warn: pipCommand not pinned by hash: .github/workflows/tests.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:43","Warn: pipCommand not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:44","Warn: pipCommand not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:46","Warn: pipCommand not pinned by hash: .github/workflows/update-ml-parameter-docs.yml:50","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   4 third-party GitHubAction dependencies pinned","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of  11 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact version/0.4.0 not signed: https://api.github.com/repos/SimonBlanke/Surfaces/releases/154927233","Warn: release artifact version/0.4.0 does not have provenance: https://api.github.com/repos/SimonBlanke/Surfaces/releases/154927233"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T05:04:27.314Z","repository_id":57435698,"created_at":"2025-08-16T05:04:27.314Z","updated_at":"2025-08-16T05:04:27.314Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31984557,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"ssl_error","status_checked_at":"2026-04-18T20:23:29.375Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bbob","benchmarking","black-box-optimization","cec2013","cec2014","cec2017","engineering","gradient-free-optimization","machine-learning","objective-functions","optimization","python","science","surrogate-models","test-functions"],"created_at":"2024-11-13T10:43:46.548Z","updated_at":"2026-04-18T21:00:37.078Z","avatar_url":"https://github.com/SimonBlanke.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://surfaces.readthedocs.io/en/latest/\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./docs/source/_static/logo_with_text.svg\"\u003e\n      \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./docs/source/_static/logo_with_text.svg\"\u003e\n      \u003cimg src=\"./docs/source/_static/surfaces_logo.svg\" width=\"550\" alt=\"Surfaces Logo\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003ch3 align=\"center\"\u003e\nTest functions for benchmarking optimization algorithms in Python.\n\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/SimonBlanke/Surfaces/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/SimonBlanke/Surfaces/tests.yml?style=for-the-badge\u0026logo=githubactions\u0026logoColor=white\u0026label=tests\" alt=\"Tests\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/SimonBlanke/Surfaces\"\u003e\u003cimg src=\"https://img.shields.io/codecov/c/github/SimonBlanke/Surfaces?style=for-the-badge\u0026logo=codecov\u0026logoColor=white\" alt=\"Coverage\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"right\"\u003e\u003cb\u003eDocumentation\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"https://surfaces.readthedocs.io/en/latest/\"\u003eHomepage\u003c/a\u003e ·\n      \u003ca href=\"https://surfaces.readthedocs.io/en/latest/get_started.html\"\u003eGetting Started\u003c/a\u003e ·\n      \u003ca href=\"https://surfaces.readthedocs.io/en/latest/installation.html\"\u003eInstallation\u003c/a\u003e ·\n      \u003ca href=\"https://surfaces.readthedocs.io/en/latest/user_guide.html\"\u003eUser Guide\u003c/a\u003e ·\n      \u003ca href=\"https://surfaces.readthedocs.io/en/latest/api_reference.html\"\u003eAPI Reference\u003c/a\u003e ·\n      \u003ca href=\"https://surfaces.readthedocs.io/en/latest/examples.html\"\u003eTutorials\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"right\"\u003e\u003cb\u003eOn this page\u003c/b\u003e\u003c/td\u003e\n    \u003ctd\u003e\n      \u003ca href=\"#key-features\"\u003eFeatures\u003c/a\u003e ·\n      \u003ca href=\"#examples\"\u003eExamples\u003c/a\u003e ·\n      \u003ca href=\"#core-concepts\"\u003eConcepts\u003c/a\u003e ·\n      \u003ca href=\"#ecosystem\"\u003eEcosystem\u003c/a\u003e ·\n      \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e ·\n      \u003ca href=\"#citation\"\u003eCitation\u003c/a\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cbr\u003e\n\n---\n\n\u003ca href=\"https://surfaces.readthedocs.io/en/latest/\"\u003e\n  \u003cimg src=\"./docs/source/_static/drop_wave_surface.svg\" width=\"240\" align=\"right\" alt=\"Bayesian Optimization on Ackley Function\"\u003e\n\u003c/a\u003e\n\n**Surfaces** is a Python library for benchmarking optimization algorithms. It provides test functions across a wide range of problem types: algebraic benchmarks, multi-objective problems, BBOB and CEC competition suites, real ML hyperparameter landscapes, constrained engineering design, discrete combinatorial problems, and ODE-based simulations. All functions share a single callable interface with automatic search space generation.\n\nML test functions support surrogate model acceleration and multi-fidelity evaluation for algorithms like Hyperband and BOHB. A built-in benchmark runner with adapters for common optimizer frameworks handles systematic comparison across function suites.\n\n\u003cp\u003e\n  \u003ca href=\"https://linkedin.com/in/simonblanke\"\u003e\u003cimg src=\"https://img.shields.io/badge/LinkedIn-Follow-0A66C2?style=flat-square\u0026logo=linkedin\" alt=\"LinkedIn\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## Installation\n\n```bash\npip install surfaces\n```\n\n\u003cp\u003e\n  \u003ca href=\"https://pypi.org/project/surfaces/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/surfaces?style=flat-square\u0026color=blue\" alt=\"PyPI\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/surfaces/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/surfaces?style=flat-square\" alt=\"Python\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eOptional dependencies\u003c/summary\u003e\n\n```bash\npip install surfaces[ml]          # Machine learning test functions (scikit-learn)\npip install surfaces[viz]         # Visualization tools (matplotlib, plotly)\npip install surfaces[cec]         # CEC competition benchmarks\npip install surfaces[timeseries]  # Time series functions (sktime)\npip install surfaces[full]        # All optional features\n```\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n## Key Features\n\n| [**Diverse Test Functions**](https://surfaces.readthedocs.io/en/latest/user_guide/test_functions/index.html)\u003cbr\u003e\u003csub\u003eAlgebraic benchmarks, BBOB and CEC competition suites, discrete combinatorial and ODE-based simulation problems.\u003c/sub\u003e | [**ML Hyperparameter Test Functions**](https://surfaces.readthedocs.io/en/latest/user_guide/test_functions/machine_learning.html)\u003cbr\u003e\u003csub\u003eOptimization landscapes from model training with cross-validation. Multi-fidelity evaluation for Hyperband and BOHB.\u003c/sub\u003e | [**Multi-Objective \u0026 Constrained**](https://surfaces.readthedocs.io/en/latest/user_guide/test_functions/index.html)\u003cbr\u003e\u003csub\u003eZDT, DTLZ and WFG suites with Pareto fronts. Engineering design problems with constraint handling.\u003c/sub\u003e |\n| :--- | :--- | :--- |\n| [**Surrogate Models**](https://surfaces.readthedocs.io/en/latest/user_guide/surrogates.html)\u003cbr\u003e\u003csub\u003ePre-trained neural networks for fast ML test function evaluation. 100-1000x faster with realistic characteristics.\u003c/sub\u003e | [**Benchmark Runner**](https://surfaces.readthedocs.io/en/latest/user_guide.html)\u003cbr\u003e\u003csub\u003eSystematic optimizer comparison across function suites. Persistent storage, statistics, comparison and visualization.\u003c/sub\u003e | [**Optimizer Integration**](https://surfaces.readthedocs.io/en/latest/user_guide/integrations/index.html)\u003cbr\u003e\u003csub\u003eWorks with Optuna, Ray Tune, scipy, Gradient-Free-Optimizers and any optimizer that accepts a callable.\u003c/sub\u003e |\n\n\u003cbr\u003e\n\n## Quick Start\n\n```python\nfrom surfaces.test_functions.algebraic import SphereFunction\n\n# Create a 3-dimensional Sphere function\nsphere = SphereFunction(n_dim=3)\n\n# Get the search space (NumPy arrays for each dimension)\nprint(sphere.search_space)\n# {'x0': array([-5.12, ..., 5.12]), 'x1': array([...]), 'x2': array([...])}\n\n# Evaluate at a point\nresult = sphere({\"x0\": 0.5, \"x1\": -0.3, \"x2\": 0.1})\nprint(f\"Value: {result}\")  # Value: -0.35 (negated for maximization)\n\n# Access the global optimum\nprint(f\"Optimum: {sphere.global_optimum}\")  # Optimum at origin\n```\n\n**Output:**\n```\n{'x0': array([-5.12, ..., 5.12]), 'x1': array([...]), 'x2': array([...])}\nValue: -0.35\nOptimum: {'x0': 0.0, 'x1': 0.0, 'x2': 0.0}\n```\n\n\u003cbr\u003e\n\n## Core Concepts\n\n```mermaid\nflowchart TB\n    subgraph Input[\"Test Function\"]\n        TF[Algebraic / ML / Engineering]\n        SS[Search Space\u003cbr/\u003eNumPy arrays per param]\n    end\n\n    TF --\u003e MOD\n    SS --\u003e OPT\n\n    MOD[Modifiers\u003cbr/\u003eNoise, Delay, Transforms]\n    OPT[Optimizer\u003cbr/\u003eHyperactive, GFO, Optuna, ...]\n\n    MOD --\u003e OPT\n    OPT --\u003e|params dict| TF\n```\n\n**Test Function**: Callable object that evaluates parameter combinations. Returns a score (maximization by default).\n\n**Search Space**: Dictionary mapping parameter names to valid values as NumPy arrays. Generated automatically from function bounds.\n\n**Modifiers**: Optional pipeline of transformations (noise, delay) applied to function evaluations.\n\n**Optimizer**: Any algorithm that can call the function with parameters from the search space.\n\n\u003cbr\u003e\n\n## Examples\n\n\u003cdetails open\u003e\n\u003csummary\u003e\u003cb\u003eAlgebraic Functions\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.algebraic import (\n    SphereFunction,\n    RastriginFunction,\n    AckleyFunction,\n)\n\n# Simple unimodal function\nsphere = SphereFunction(n_dim=5)\nprint(sphere({\"x0\": 0, \"x1\": 0, \"x2\": 0, \"x3\": 0, \"x4\": 0}))  # Optimum: 0\n\n# Highly multimodal function with many local optima\nrastrigin = RastriginFunction(n_dim=3)\nprint(f\"Search space bounds: {rastrigin.spec.default_bounds}\")\n\n# Challenging function with a narrow global basin\nackley = AckleyFunction()  # 2D by default\nprint(f\"Global optimum at: {ackley.x_global}\")\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eMachine Learning Functions\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.machine_learning.hyperparameter_optimization.tabular import (\n    KNeighborsClassifierFunction,\n    RandomForestClassifierFunction,\n)\n\n# KNN hyperparameter optimization on iris dataset\nknn = KNeighborsClassifierFunction(dataset=\"iris\", cv=5)\nprint(knn.search_space)\n# {'n_neighbors': [3, 5, 7, ...], 'algorithm': ['auto', 'ball_tree', ...]}\n\naccuracy = knn({\"n_neighbors\": 5, \"algorithm\": \"auto\"})\nprint(f\"CV Accuracy: {accuracy:.4f}\")\n\n# Random Forest on wine dataset\nrf = RandomForestClassifierFunction(dataset=\"wine\", cv=3)\nscore = rf({\"n_estimators\": 100, \"max_depth\": 5, \"min_samples_split\": 2})\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eEngineering Functions\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.algebraic.constrained import (\n    WeldedBeamFunction,\n    PressureVesselFunction,\n)\n\n# Welded beam design optimization\nbeam = WeldedBeamFunction()\ncost = beam({\"h\": 0.2, \"l\": 6.0, \"t\": 8.0, \"b\": 0.3})\nprint(f\"Fabrication cost: {cost}\")\n\n# Pressure vessel design\nvessel = PressureVesselFunction()\nprint(f\"Design variables: {list(vessel.search_space.keys())}\")\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eUsing Modifiers\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.algebraic import SphereFunction\nfrom surfaces.modifiers import DelayModifier, GaussianNoise\n\n# Add realistic conditions to any function\nsphere = SphereFunction(\n    n_dim=2,\n    modifiers=[\n        DelayModifier(delay=0.01),         # Simulate expensive evaluation\n        GaussianNoise(sigma=0.1, seed=42)  # Add measurement noise\n    ]\n)\n\n# Evaluate with modifiers applied\nnoisy_result = sphere({\"x0\": 1.0, \"x1\": 2.0})\n\n# Get the true value without modifiers\npure = sphere.pure({\"x0\": 1.0, \"x1\": 2.0})\nprint(f\"Noisy: {noisy_result:.4f}, True: {pure:.4f}\")\n```\n\n\u003c/details\u003e\n\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eSurrogate Models\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.machine_learning import KNeighborsClassifierFunction\n\n# Real evaluation (slow but accurate)\nfunc_real = KNeighborsClassifierFunction(dataset=\"digits\", cv=5, use_surrogate=False)\n\n# Surrogate evaluation (1000x faster)\nfunc_fast = KNeighborsClassifierFunction(dataset=\"digits\", cv=5, use_surrogate=True)\n\n# Same interface, dramatically different speed\nresult_real = func_real({\"n_neighbors\": 5, \"algorithm\": \"auto\"})  # ~100ms\nresult_fast = func_fast({\"n_neighbors\": 5, \"algorithm\": \"auto\"})  # ~0.1ms\n\n# Surrogates capture realistic ML landscape characteristics:\n# multi-modality, hyperparameter interactions, plateaus\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eMulti-Fidelity Evaluation\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.machine_learning import RandomForestClassifierFunction\n\nfunc = RandomForestClassifierFunction(dataset=\"digits\", cv=3)\nparams = {\"n_estimators\": 100, \"max_depth\": 10, \"min_samples_split\": 2}\n\n# Cheap evaluation on 10% of data (for Hyperband/BOHB early stopping)\nscore_cheap = func(params, fidelity=0.1)\n\n# Full evaluation on all data\nscore_full = func(params, fidelity=1.0)\n\n# Fidelity works with all ML functions: classification, regression,\n# time series, image. Subsampling is stratified for classification\n# and sequential for time series to preserve temporal order.\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eBenchmark Suites\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.benchmark.bbob import (\n    Sphere as BBOBSphere,\n    RosenbrockOriginal as BBOBRosenbrock,\n)\n\n# BBOB (Black-Box Optimization Benchmarking) functions\n# Used in COCO platform for algorithm comparison\nbbob_sphere = BBOBSphere(n_dim=10)\nbbob_rosenbrock = BBOBRosenbrock(n_dim=10)\n\nprint(f\"BBOB Sphere f_global: {bbob_sphere.f_global}\")\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eMulti-Objective Functions\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.algebraic.multi_objective import ZDT1, DTLZ2, WFG4\n\n# ZDT1: Two-objective, convex Pareto front\nzdt1 = ZDT1(n_dim=10)\nobjectives = zdt1({f\"x{i}\": 0.5 for i in range(10)})\n\n# DTLZ2: Scalable to any number of objectives\ndtlz2 = DTLZ2(n_dim=12, n_objectives=3)\n\n# WFG4: Non-separable with concave Pareto front\nwfg4 = WFG4(n_dim=10, n_objectives=2)\n\n# All provide analytical Pareto fronts for comparison\npareto = zdt1.pareto_front(n_points=100)\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eBenchmark Runner\u003c/b\u003e\u003c/summary\u003e\n\n```python\nimport random\nfrom surfaces.benchmark import Benchmark\nfrom surfaces import collection\n\n# Minimal ask/tell optimizer (any optimizer with this interface works)\nclass RandomSampler:\n    def __init__(self, search_space, seed=0):\n        self._space = search_space\n        self._rng = random.Random(seed)\n\n    def ask(self):\n        return {k: self._rng.choice(v) for k, v in self._space.items()}\n\n    def tell(self, params, score):\n        pass\n\n# Run benchmark\nbench = Benchmark(budget_iter=50, n_seeds=2, seed=42)\nbench.add_functions(collection.quick)\nbench.add_optimizers([RandomSampler])\nbench.run()\n\nprint(bench.results.summary())\n```\n\n\u003c/details\u003e\n\n\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eIntegration with Optimizers\u003c/b\u003e\u003c/summary\u003e\n\n```python\nfrom surfaces.test_functions.algebraic import AckleyFunction\n\n# Surfaces works with any optimizer accepting callable + search space\nfunc = AckleyFunction()\n\n# Example with Hyperactive\nfrom hyperactive import Hyperactive\n\nhyper = Hyperactive()\nhyper.add_search(func, func.search_space, n_iter=100)\nhyper.run()\n\nprint(f\"Best score: {hyper.best_score(func)}\")\nprint(f\"Best params: {hyper.best_para(func)}\")\n\n# Example with Gradient-Free-Optimizers\nfrom gradient_free_optimizers import BayesianOptimizer\n\nopt = BayesianOptimizer(func.search_space)\nopt.search(func, n_iter=50)\n```\n\n\u003c/details\u003e\n\n\u003cbr\u003e\n\n## Ecosystem\n\nThis library is part of a suite of optimization tools. For updates, [follow on GitHub](https://github.com/SimonBlanke).\n\n| Package | Description |\n|---------|-------------|\n| [Hyperactive](https://github.com/SimonBlanke/Hyperactive) | Hyperparameter optimization framework with experiment abstraction and ML integrations |\n| [Gradient-Free-Optimizers](https://github.com/SimonBlanke/Gradient-Free-Optimizers) | Core optimization algorithms for black-box function optimization |\n| [Surfaces](https://github.com/SimonBlanke/Surfaces) | Test functions and benchmark surfaces for optimization algorithm evaluation |\n\n\u003cbr\u003e\n\n## Documentation\n\n| Resource | Description |\n|----------|-------------|\n| [User Guide](https://surfaces.readthedocs.io/en/latest/user_guide.html) | Installation and basic usage examples |\n| [API Reference](https://surfaces.readthedocs.io/en/latest/api_reference.html) | Complete list of available test functions |\n| [Examples](https://surfaces.readthedocs.io/en/latest/examples.html) | Code examples for common use cases |\n| [GitHub Issues](https://github.com/SimonBlanke/Surfaces/issues) | Bug reports and feature requests |\n\n\u003cbr\u003e\n\n## Contributing\n\nContributions welcome! See [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.\n\n- **Bug reports**: [GitHub Issues](https://github.com/SimonBlanke/Surfaces/issues)\n- **Feature requests**: [GitHub Discussions](https://github.com/SimonBlanke/Surfaces/discussions)\n- **Questions**: [GitHub Issues](https://github.com/SimonBlanke/Surfaces/issues)\n\n\u003cbr\u003e\n\n## Citation\n\nIf you use this software in your research, please cite:\n\n```bibtex\n@software{surfaces,\n  author = {Simon Blanke},\n  title = {Surfaces: Test functions for optimization algorithm benchmarking},\n  year = {2024},\n  url = {https://github.com/SimonBlanke/Surfaces},\n}\n```\n\n\u003cbr\u003e\n\n## License\n\n[MIT License](./LICENSE) - Free for commercial and academic use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonblanke%2Fsurfaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonblanke%2Fsurfaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonblanke%2Fsurfaces/lists"}