useful-optimizer


Nameuseful-optimizer JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryA dedicated set of optimization algorithms for numeric problems.
upload_time2024-08-11 15:01:11
maintainerNone
docs_urlNone
authorAnselm Hahn
requires_python<3.13,>=3.10
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Useful Optimizer

Useful Optimizer is a dedicated set of optimization algorithms for numeric problems. It's designed to provide a comprehensive collection of optimization techniques that can be easily used and integrated into any project.

## Version

The current version of Useful Optimizer is 0.1.0.

## Features

- A wide range of optimization algorithms.
- Easy to use and integrate.
- Suitable for various numeric problems.
- Having fun to play with the algorithms

## Installation

To install Useful Optimizer, you can use pip:

```bash
pip install git+https://github.com/Anselmoo/useful-optimizer
```

## Usage

Here's a basic example of how to use Useful Optimizer:

```python
from opt.benchmark import CrossEntropyMethod
from opt.benchmark.functions import shifted_ackley

optimizer = CrossEntropyMethod(
        func=shifted_ackley,
        dim=2,
        lower_bound=-12.768,
        upper_bound=+12.768,
        population_size=100,
        max_iter=1000,
    )
best_solution, best_fitness = optimizer.search()
print(f"Best solution: {best_solution}")
print(f"Best fitness: {best_fitness}")
```

## Current Implemented Optimizer

The current version of Useful Optimizer includes a wide range of optimization algorithms, each implemented as a separate module. Here's a brief overview of the implemented optimizers:

Sure, here's a brief description of each optimizer:

- **Adadelta, Adagrad, and Adaptive Moment Estimation**: These are gradient-based optimization algorithms commonly used in machine learning and deep learning.

- **Ant Colony Optimization**: This is a nature-inspired algorithm that mimics the behavior of ants to solve optimization problems.

- **Artificial Fish Swarm Algorithm**: This algorithm simulates the behavior of fish in nature to perform global optimization.

- **Augmented Lagrangian Method**: This is a method to solve constrained optimization problems. It combines the objective function and the constraints into a single function using Lagrange multipliers.

- **Bat Algorithm**: This is a metaheuristic optimization algorithm inspired by the echolocation behavior of microbats.

- **Bee Algorithm**: This is a population-based search algorithm inspired by the food foraging behavior of honey bee colonies.

- **Cat Swarm Optimization**: This algorithm is based on the behavior of cats and distinguishes between two forms of behavior in cats: seeking mode and tracing mode.

- **CMA-ES (Covariance Matrix Adaptation Evolution Strategy)**: This is an evolutionary algorithm for difficult non-linear non-convex optimization problems in continuous domain.

- **Colliding Bodies Optimization**: This is a physics-inspired optimization method, based on the collision and explosion of bodies.

- **Cross Entropy Method**: This is a Monte Carlo method for importance sampling and optimization.

- **Cuckoo Search**: This is a nature-inspired metaheuristic optimization algorithm, which is based on the obligate brood parasitism of some cuckoo species.

- **Cultural Algorithm**: This is a type of evolutionary algorithm that is based on the concept of culture, or shared information and knowledge.

- **Differential Evolution**: This is a population-based metaheuristic algorithm, which uses mechanisms inspired by biological evolution, such as reproduction, mutation, recombination, and selection.

- **Eagle Strategy**: This is a metaheuristic optimization algorithm inspired by the hunting behavior of eagles.

- **Estimation of Distribution Algorithm**: This is a stochastic optimization algorithm that uses a probabilistic model of candidate solutions.

- **Firefly Algorithm**: This is a nature-inspired metaheuristic optimization algorithm, based on the flashing behavior of fireflies.

- **Genetic Algorithm**: This is a search heuristic that is inspired by Charles Darwin’s theory of natural evolution.

- **Glowworm Swarm Optimization**: This is a nature-inspired optimization algorithm based on the behavior of glowworms.

- **Grey Wolf Optimizer**: This is a metaheuristic optimization algorithm inspired by grey wolves.

- **Harmony Search**: This is a music-inspired metaheuristic optimization algorithm.

- **Hessian Free Optimization**: This is a second-order optimization algorithm that uses information from the Hessian matrix to guide the search.

- **Hill Climbing**: This is a mathematical optimization technique which belongs to the family of local search.

- **Imperialist Competitive Algorithm**: This is a socio-politically motivated global search strategy, which is based on the imperialistic competition.

- **Linear Discriminant Analysis**: This is a method used in statistics, pattern recognition, and machine learning to find a linear combination of features that characterizes or separates two or more classes of objects or events.

- **Particle Filter**: This is a statistical filter technique used to estimate the state of a system where the state model and the measurements are both nonlinear.

- **Particle Swarm Optimization**: This is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality, mimicking the social behavior of bird flocking or fish schooling.

- **Parzen Tree Estimator**: This is a non-parametric method to estimate the density function of random variables.

- **Shuffled Frog Leaping Algorithm**: This is a metaheuristic optimization algorithm inspired by the memetic evolution of a group of frogs when searching for food.

- **Simulated Annealing**: This is a probabilistic technique for approximating the global optimum of a given function, mimicking the process of heating a material and then slowly lowering the temperature to decrease defects, thus minimizing the system energy.

- **Sine Cosine Algorithm**: This is a new population-based meta-heuristic algorithm, inspired by the mathematical sine and cosine functions.

- **Squirrel Search Algorithm**: This is a new nature-inspired metaheuristic optimization algorithm, inspired by the caching behavior of squirrels.

- **Stochastic Diffusion Search**: This is a population-based search algorithm, based on the behavior of ants when searching for food.

- **Stochastic Fractal Search**: This is a metaheuristic search algorithm inspired by the natural phenomenon of fractal shapes and Brownian motion.

- **Successive Linear Programming**: This is an optimization method for nonlinear optimization problems.

- **Tabu Search**: This is a metaheuristic search method employing local search methods used for mathematical optimization.

- **Variable Depth Search**: This is a search algorithm that explores the search space by variable-depth first search and backtracking.

- **Variable Neighbourhood Search**: This is a metaheuristic search method for discrete optimization problems.

- **Very Large Scale Neighborhood Search**: This is a search method that explores very large neighborhoods with an efficient algorithm.

- **Whale Optimization Algorithm**: This is a new bio-inspired optimization algorithm, which simulates the social behavior of humpback whales.

> [!NOTE]
> Please note that not all of these algorithms are suitable for all types of optimization problems. Some are better suited for continuous optimization problems, some for discrete optimization problems, and others for specific types of problems like quadratic programming or linear discriminant analysis.

## Contributing

Contributions to Useful Optimizer are welcome! Please read the contributing guidelines before getting started.

## [License](LICENSE)

---

> [!WARNING]
> This project was generated with GitHub Copilot and may not be completely verified. Please use with caution and feel free to report any issues you encounter. Thank you!

> [!WARNING]
> Some parts still contain the _legacy_ `np.random.rand` call. See also: https://docs.astral.sh/ruff/rules/numpy-legacy-random/


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "useful-optimizer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Anselm Hahn",
    "author_email": "Anselm.Hahn@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/62/89/aca2bdfd91803878f3c39f7b8821756b9d3c30f382ae75bb4b538c8c180a/useful_optimizer-0.1.2.tar.gz",
    "platform": null,
    "description": "# Useful Optimizer\n\nUseful Optimizer is a dedicated set of optimization algorithms for numeric problems. It's designed to provide a comprehensive collection of optimization techniques that can be easily used and integrated into any project.\n\n## Version\n\nThe current version of Useful Optimizer is 0.1.0.\n\n## Features\n\n- A wide range of optimization algorithms.\n- Easy to use and integrate.\n- Suitable for various numeric problems.\n- Having fun to play with the algorithms\n\n## Installation\n\nTo install Useful Optimizer, you can use pip:\n\n```bash\npip install git+https://github.com/Anselmoo/useful-optimizer\n```\n\n## Usage\n\nHere's a basic example of how to use Useful Optimizer:\n\n```python\nfrom opt.benchmark import CrossEntropyMethod\nfrom opt.benchmark.functions import shifted_ackley\n\noptimizer = CrossEntropyMethod(\n        func=shifted_ackley,\n        dim=2,\n        lower_bound=-12.768,\n        upper_bound=+12.768,\n        population_size=100,\n        max_iter=1000,\n    )\nbest_solution, best_fitness = optimizer.search()\nprint(f\"Best solution: {best_solution}\")\nprint(f\"Best fitness: {best_fitness}\")\n```\n\n## Current Implemented Optimizer\n\nThe current version of Useful Optimizer includes a wide range of optimization algorithms, each implemented as a separate module. Here's a brief overview of the implemented optimizers:\n\nSure, here's a brief description of each optimizer:\n\n- **Adadelta, Adagrad, and Adaptive Moment Estimation**: These are gradient-based optimization algorithms commonly used in machine learning and deep learning.\n\n- **Ant Colony Optimization**: This is a nature-inspired algorithm that mimics the behavior of ants to solve optimization problems.\n\n- **Artificial Fish Swarm Algorithm**: This algorithm simulates the behavior of fish in nature to perform global optimization.\n\n- **Augmented Lagrangian Method**: This is a method to solve constrained optimization problems. It combines the objective function and the constraints into a single function using Lagrange multipliers.\n\n- **Bat Algorithm**: This is a metaheuristic optimization algorithm inspired by the echolocation behavior of microbats.\n\n- **Bee Algorithm**: This is a population-based search algorithm inspired by the food foraging behavior of honey bee colonies.\n\n- **Cat Swarm Optimization**: This algorithm is based on the behavior of cats and distinguishes between two forms of behavior in cats: seeking mode and tracing mode.\n\n- **CMA-ES (Covariance Matrix Adaptation Evolution Strategy)**: This is an evolutionary algorithm for difficult non-linear non-convex optimization problems in continuous domain.\n\n- **Colliding Bodies Optimization**: This is a physics-inspired optimization method, based on the collision and explosion of bodies.\n\n- **Cross Entropy Method**: This is a Monte Carlo method for importance sampling and optimization.\n\n- **Cuckoo Search**: This is a nature-inspired metaheuristic optimization algorithm, which is based on the obligate brood parasitism of some cuckoo species.\n\n- **Cultural Algorithm**: This is a type of evolutionary algorithm that is based on the concept of culture, or shared information and knowledge.\n\n- **Differential Evolution**: This is a population-based metaheuristic algorithm, which uses mechanisms inspired by biological evolution, such as reproduction, mutation, recombination, and selection.\n\n- **Eagle Strategy**: This is a metaheuristic optimization algorithm inspired by the hunting behavior of eagles.\n\n- **Estimation of Distribution Algorithm**: This is a stochastic optimization algorithm that uses a probabilistic model of candidate solutions.\n\n- **Firefly Algorithm**: This is a nature-inspired metaheuristic optimization algorithm, based on the flashing behavior of fireflies.\n\n- **Genetic Algorithm**: This is a search heuristic that is inspired by Charles Darwin\u2019s theory of natural evolution.\n\n- **Glowworm Swarm Optimization**: This is a nature-inspired optimization algorithm based on the behavior of glowworms.\n\n- **Grey Wolf Optimizer**: This is a metaheuristic optimization algorithm inspired by grey wolves.\n\n- **Harmony Search**: This is a music-inspired metaheuristic optimization algorithm.\n\n- **Hessian Free Optimization**: This is a second-order optimization algorithm that uses information from the Hessian matrix to guide the search.\n\n- **Hill Climbing**: This is a mathematical optimization technique which belongs to the family of local search.\n\n- **Imperialist Competitive Algorithm**: This is a socio-politically motivated global search strategy, which is based on the imperialistic competition.\n\n- **Linear Discriminant Analysis**: This is a method used in statistics, pattern recognition, and machine learning to find a linear combination of features that characterizes or separates two or more classes of objects or events.\n\n- **Particle Filter**: This is a statistical filter technique used to estimate the state of a system where the state model and the measurements are both nonlinear.\n\n- **Particle Swarm Optimization**: This is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality, mimicking the social behavior of bird flocking or fish schooling.\n\n- **Parzen Tree Estimator**: This is a non-parametric method to estimate the density function of random variables.\n\n- **Shuffled Frog Leaping Algorithm**: This is a metaheuristic optimization algorithm inspired by the memetic evolution of a group of frogs when searching for food.\n\n- **Simulated Annealing**: This is a probabilistic technique for approximating the global optimum of a given function, mimicking the process of heating a material and then slowly lowering the temperature to decrease defects, thus minimizing the system energy.\n\n- **Sine Cosine Algorithm**: This is a new population-based meta-heuristic algorithm, inspired by the mathematical sine and cosine functions.\n\n- **Squirrel Search Algorithm**: This is a new nature-inspired metaheuristic optimization algorithm, inspired by the caching behavior of squirrels.\n\n- **Stochastic Diffusion Search**: This is a population-based search algorithm, based on the behavior of ants when searching for food.\n\n- **Stochastic Fractal Search**: This is a metaheuristic search algorithm inspired by the natural phenomenon of fractal shapes and Brownian motion.\n\n- **Successive Linear Programming**: This is an optimization method for nonlinear optimization problems.\n\n- **Tabu Search**: This is a metaheuristic search method employing local search methods used for mathematical optimization.\n\n- **Variable Depth Search**: This is a search algorithm that explores the search space by variable-depth first search and backtracking.\n\n- **Variable Neighbourhood Search**: This is a metaheuristic search method for discrete optimization problems.\n\n- **Very Large Scale Neighborhood Search**: This is a search method that explores very large neighborhoods with an efficient algorithm.\n\n- **Whale Optimization Algorithm**: This is a new bio-inspired optimization algorithm, which simulates the social behavior of humpback whales.\n\n> [!NOTE]\n> Please note that not all of these algorithms are suitable for all types of optimization problems. Some are better suited for continuous optimization problems, some for discrete optimization problems, and others for specific types of problems like quadratic programming or linear discriminant analysis.\n\n## Contributing\n\nContributions to Useful Optimizer are welcome! Please read the contributing guidelines before getting started.\n\n## [License](LICENSE)\n\n---\n\n> [!WARNING]\n> This project was generated with GitHub Copilot and may not be completely verified. Please use with caution and feel free to report any issues you encounter. Thank you!\n\n> [!WARNING]\n> Some parts still contain the _legacy_ `np.random.rand` call. See also: https://docs.astral.sh/ruff/rules/numpy-legacy-random/\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A dedicated set of optimization algorithms for numeric problems.",
    "version": "0.1.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "188b889d6ca47352db63069aa6c84c71fe6badae6ebbc6177cfa4e43ed824598",
                "md5": "b6fb9f7a693c085493c0bbd34ea62fb0",
                "sha256": "b80ae932b73e375e86f39f7872fcf4bcbef0c6e0cdc8a031e837ac942c59e514"
            },
            "downloads": -1,
            "filename": "useful_optimizer-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b6fb9f7a693c085493c0bbd34ea62fb0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 83495,
            "upload_time": "2024-08-11T15:01:10",
            "upload_time_iso_8601": "2024-08-11T15:01:10.870924Z",
            "url": "https://files.pythonhosted.org/packages/18/8b/889d6ca47352db63069aa6c84c71fe6badae6ebbc6177cfa4e43ed824598/useful_optimizer-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6289aca2bdfd91803878f3c39f7b8821756b9d3c30f382ae75bb4b538c8c180a",
                "md5": "4d0940e31ea86df3ed8f88068e74ed32",
                "sha256": "7d0742d096f35882fa7339b0f219bdc16dd5c38189aeb9b2b601a6992c351c3b"
            },
            "downloads": -1,
            "filename": "useful_optimizer-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4d0940e31ea86df3ed8f88068e74ed32",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 45466,
            "upload_time": "2024-08-11T15:01:11",
            "upload_time_iso_8601": "2024-08-11T15:01:11.996813Z",
            "url": "https://files.pythonhosted.org/packages/62/89/aca2bdfd91803878f3c39f7b8821756b9d3c30f382ae75bb4b538c8c180a/useful_optimizer-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-11 15:01:11",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "useful-optimizer"
}
        
Elapsed time: 0.48270s