Skip to main content

A description of what dynamic_tuna does

Project description

Dynamic Tuna: Flexible Bayesian Optimization Library

Dynamic Tuna is a Bayesian optimization library built on Optuna and scikit-optimize that supports customizable exploration-exploitation control. The supported samplers (surrogate models) are Gaussian Process, Random Forest, Gradient Boosted Decision Trees, and Tree-structured Parzen Estimator -- each with customizable exploration-exploitation controls.

Dynamic Tuna License


🌟 Features

  • Dynamic Sampling: Control the exploration-exploitation tradeoff with flexible n_ei_function parameters.

  • Diverse Samplers: Use Gaussian Process, Random Forest, or Gradient Boosted Trees as the surrogate model for efficient sampling.

  • Customizable Hyperparameters: Define custom n_ei_function parameters for precise control over the optimization process.


📥 Installation

Clone the repository and install the required packages from requirements.txt:

git clone https://github.com/yourusername/dynamic_tuna.git
cd dynamic_tuna
pip install -r requirements.txt


	Note: This library requires Python 3.8+.

🚀 Getting Started

Here’s a quick example to get you started with Dynamic Tuna.


import optuna
from dynamic_tuna import GBTSampler

# Define search space
search_space = {
    "param1": optuna.distributions.UniformDistribution(0, 1),
    "param2": optuna.distributions.IntUniformDistribution(1, 100)}

# Initialize sampler with dynamic EI candidates
sampler = GBTSampler(search_space, n_ei_function=lambda n, a=1, b=2: a * n + b)

# Create and run study
study = optuna.create_study(sampler=sampler)
study.optimize(objective_function, n_trials=50)
print("Best Parameters:", study.best_params)

⚙️ Usage

1.	Initialize a Sampler:

Choose from GBTSampler, RandomForestSampler, or GPSampler and define your n_ei_function. 2. Define a Search Space: Use Optuna’s UniformDistribution, IntUniformDistribution, and more. 3. Run Optimization: Run your study with optuna.create_study() and check the results.

🔧 Contributing

Contributions are welcome! To contribute:

1.	Fork the repository.
2.	Create a new branch with your feature or bugfix.
3.	Submit a pull request with a description of your changes.

Please ensure that your code is well-documented and tested.

📜 License

This project is licensed under the MIT License. See the LICENSE file for details.

📬 Contact

Have questions or feedback? Reach out to me at dsilverberg95@gmail.com or create an issue in the repository.

Happy Optimizing! 🎉

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dynamic_tuna-0.1.0.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamic_tuna-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file dynamic_tuna-0.1.0.tar.gz.

File metadata

  • Download URL: dynamic_tuna-0.1.0.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for dynamic_tuna-0.1.0.tar.gz
Algorithm Hash digest
SHA256 645f9a4c1856389cfe2aef5b04add0b47e00596dbdade53648e8c5599d24a248
MD5 1d94fde29aecfc7aef0de84395682f76
BLAKE2b-256 ff3e01810fbc3a91ffe813a49c81af3f8c9f1a585772b7c9d114c13e45507215

See more details on using hashes here.

File details

Details for the file dynamic_tuna-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dynamic_tuna-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.1

File hashes

Hashes for dynamic_tuna-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e059085623e772574d812818ac5cd737a83cc1aca2ca5ed745a192528c8115a1
MD5 2260e371cc67efcd4b1d375d150208bb
BLAKE2b-256 0bda82b16f70ec8b956ae1ed27906bbac6252cdd992ad2901579da8e957e6132

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page