A Mathematical-Based Optimization Method
Project description
Gradient_Based-Optimizatio-in-Python
This repository contains the implementation of a novel metaheuristic optimization algorithm, the Gradient-Based Optimizer (GBO). Inspired by the gradient-based Newton’s method, GBO is designed for both mathematical optimization and real-world problem-solving with enhanced exploration and exploitation capabilities.
Gradient-Based Optimizer (GBO)
This repository contains the implementation of a novel metaheuristic optimization algorithm, the Gradient-Based Optimizer (GBO). Inspired by the gradient-based Newton’s method, GBO is designed for both mathematical optimization and real-world problem-solving with enhanced exploration and exploitation capabilities.
Overview
The Gradient-Based Optimizer (GBO) employs two primary operators:
-
Gradient Search Rule (GSR): Uses the gradient-based method to bolster the exploration capability and hasten convergence, allowing the algorithm to find better positions in the search space.
-
Local Escaping Operator (LEO): Facilitates the escape from local optima, enhancing the ability of GBO to avoid becoming trapped and thus enabling more thorough exploration of the search space.
Key Features
- Robust Exploration & Exploitation: Effectively balances exploration and exploitation of the search space, driven by advanced operators.
- Convergence Enhancement: Accelerates convergence rate while maintaining solution diversity to avoid local optima.
- Versatile Application: Demonstrates efficacy across mathematical test functions and complex engineering problems.
- Comparative Performance: Outperforms existing algorithms in literature, offering superior solutions in benchmark tests.
Implementation Details
This Python implementation utilizes the numpy
library for efficient numerical computations and matrix operations. The main function GBO
can be customized to suit specific optimization problems.
Installation
- pip install IM_GBO_optimizer
Prerequisites
- Python (>=3.6)
- NumPy
Usage
The GBO can be applied to a variety of optimization problems, requiring only the definition of an objective function and problem-specific parameters. Here’s how to get started:
from IM_GBO_optimizer import GBO # Assuming the file is named gbo.py
def sample_objective_function(x):
return sum(x**2) # Example objective function
result = GBO(
nP=30, # Number of population members
MaxIt=100, # Maximum number of iterations
lb=-10, # Lower bound of search space
ub=10, # Upper bound of search space
dim=5, # Dimensionality
fobj=sample_objective_function,
constraint_handling="clip",
verbose=True
)
print("Best Solution:", result.bestIndividual)
print("Best Cost:", result.BestCost)
## Parameters
nP: Population size
MaxIt: Maximum number of iterations.
lb: Lower bound for each dimension.
ub: Upper bound for each dimension.
dim: Problem dimensionality.
fobj: Objective function to minimize.
constraint_handling: Method for handling constraints ("clip" or "RI").
verbose: When True, displays iteration progress.
## Output
The GBO function returns an object capturing:
The GBO algorithm was rigorously tested:
Phase 1: 28 mathematical functions assessed the algorithm's characteristics against five existing algorithms, showing superior performance.
Phase 2: Applied to six engineering problems, further demonstrating its efficacy in real-world applications.
License
This project is released under the MIT License.
Acknowledgments
Recognition of the algorithm's design principles inspired by the gradient method, and efforts taken to tailor the GBO for both broad and specialized applications.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file im_gbo_optimizer-2.0.0.tar.gz
.
File metadata
- Download URL: im_gbo_optimizer-2.0.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 903d05cd3a6fcc94e0576bed4eefcaf5e898b603b51c8f6f3d7fcdaa3824224b |
|
MD5 | cbcef9781615e4ca42b0299ad403f154 |
|
BLAKE2b-256 | 756828044fd62a1a2b150ea05ae6575046385339f01f759b70cbfee091259dc5 |
File details
Details for the file IM_GBO_optimizer-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: IM_GBO_optimizer-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8848597107aa095164264e3c498f171057e2c413936c5af90ca6fb77ba9b2cba |
|
MD5 | a39b1385b2dc56830d7813c6bae4bf9a |
|
BLAKE2b-256 | 4a93f429841e8506b5fdef5c51db1a44d6a71b3b2e79919bfd5295860dde6f7f |