Metadata-Version: 2.4
Name: banana-bench
Version: 0.1.0
Summary: A collection of 55+ standard mathematical benchmark functions for testing and evaluating optimization algorithms.
Author-email: AK Rahul <ak-rahul@users.noreply.github.com>
Maintainer-email: AK Rahul <ak-rahul@users.noreply.github.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/ak-rahul/banana-bench
Project-URL: Repository, https://github.com/ak-rahul/banana-bench
Project-URL: Bug Tracker, https://github.com/ak-rahul/banana-bench/issues
Keywords: optimization,benchmark,test-functions,mathematical-optimization,global-optimization,algorithms,machine-learning,numerical-optimization,metaheuristics,visualization,benchmarking
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.20.0
Provides-Extra: viz
Requires-Dist: matplotlib>=3.3.0; extra == "viz"
Provides-Extra: parallel
Requires-Dist: joblib>=1.2.0; extra == "parallel"
Provides-Extra: progress
Requires-Dist: tqdm>=4.65.0; extra == "progress"
Provides-Extra: interactive
Requires-Dist: plotly>=5.0.0; extra == "interactive"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: ruff>=0.6.0; extra == "dev"
Requires-Dist: mypy<2.0.0,>=1.0.0; extra == "dev"
Requires-Dist: matplotlib>=3.3.0; extra == "dev"
Requires-Dist: tqdm>=4.65.0; extra == "dev"
Requires-Dist: joblib>=1.2.0; extra == "dev"
Requires-Dist: scipy>=1.7.0; extra == "dev"
Requires-Dist: plotly>=5.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
Provides-Extra: all
Requires-Dist: matplotlib>=3.3.0; extra == "all"
Requires-Dist: tqdm>=4.65.0; extra == "all"
Requires-Dist: joblib>=1.2.0; extra == "all"
Requires-Dist: scipy>=1.7.0; extra == "all"
Requires-Dist: plotly>=5.0.0; extra == "all"

# banana-bench

[![PyPI version](https://img.shields.io/pypi/v/banana-bench)](https://pypi.org/project/banana-bench/)
[![Python](https://img.shields.io/pypi/pyversions/banana-bench)](https://pypi.org/project/banana-bench/)
[![Downloads](https://pepy.tech/badge/banana-bench)](https://pepy.tech/project/banana-bench)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ak-rahul/banana-bench/blob/main/LICENSE.md)
[![Build Status](https://github.com/ak-rahul/banana-bench/actions/workflows/quality.yml/badge.svg)](https://github.com/ak-rahul/banana-bench/actions/workflows/quality.yml)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)

A comprehensive collection of 55+ standard mathematical benchmark functions for testing and evaluating optimization algorithms.

> **Why "banana-bench"?** Rosenbrock's function — one of the most famous test functions in
> optimization, and part of this suite (`rosenbrock`) — is nicknamed the "banana function" for its
> curved, banana-shaped valley. This is the bench you run your optimizer through.

## 📚 Documentation

Detailed documentation is available in the `docs/` directory:

- **[User Guide & Examples](docs/USER_GUIDE.md)**: Detailed tutorials on metadata, benchmarking, and utilities.
- **[Function Reference](docs/BENCHMARK_FUNCTIONS.md)**: Complete guide to all 55+ functions with domains and global minima.
- **[Visualization Gallery](docs/VISUALIZATION.md)**: Examples of all plotting and analysis tools.
- **[API Reference](docs/API_REFERENCE.md)**: Class and function definitions.

## 🎯 Features

- **55+ Benchmark Functions**: Multimodal, Unimodal, and Special functions.
- **Rich Metadata**: Access bounds, dimensions, known minima programmatically.
- **Visualization**: 2D/3D plots, convergence tracking, and heatmaps.
- **Benchmarking Tools**: Automated testing with `BenchmarkRunner`.
- **Zero Core Dependencies**: Only NumPy is required.

## 📦 Installation

### From PyPI
```bash
pip install banana-bench
```

### From Source
```bash
git clone https://github.com/ak-rahul/banana-bench.git
cd banana-bench
pip install -e .
```

To install with visualization support:
```bash
pip install banana-bench[viz]
```

## 🚀 Quick Start

```python
import numpy as np
from bananabench import ackley, BenchmarkRunner

# 1. Use a single function
x = np.zeros(5)
print(f"Ackley(0) = {ackley(x)}")

# 2. Run a benchmark suite
def my_optimizer(func, bounds):
    # Your optimization logic here...
    return np.zeros(len(bounds)), 0.0

runner = BenchmarkRunner(my_optimizer, "MyAlgo", n_runs=5)
results = runner.run_suite(functions=['sphere', 'ackley'])
```

For detailed usage, see the **[User Guide](docs/USER_GUIDE.md)**.
