Skip to main content

Optimisation-Algorithms

A collection of the most commonly used Optimisation Algorithms for Data Science & Machine Learning


This repository is created by and belongs to: https://github.com/Muradmustafayev-03

Contributing guide: https://github.com/Muradmustafayev-03/Optimisation-Algorithms/blob/main/CONTRIBUTING.md

To report any issues: https://github.com/Muradmustafayev-03/Optimisation-Algorithms/issues

To install the package as a library use:

pip install optimisation-algorithms

Then to import:

import optimisation-algorithms


In this project I try to collect as many useful Optimisation Algorithms as possible, and write them in a simple and reusable way. The idea is write all these algorithms in python, in a fundamental, yet easy-to-use way, with numpy being the only external library used. The project is currently on the early stages of the development, but one can already try and implement it in their own projects. And for sure, you are always welcome to contribute or to make any suggestions. Any feedback is appreciated.

What is an Optimisation Algorithm?

For more information: https://en.wikipedia.org/wiki/Mathematical_optimization

Optimisation Algorithm is an algorithm, that is used to find input values of the global minima, or less often, of the global maxima of a function.

In this project, all the algorithms look for the global minima of the given function. However, if you want to find the global maxima of a function, you can pass the negation of your function: -f(x), instead of f(x), having that its mimima will be the maxima of your function.

Optimization algorithms are widely used in Machine Learning, Mathematics and a range of other applied sciences.

There are multiple kinds of Optimization algorithms, so here is a short description ofthe ones, used in the project:

Iterative Algorithms

Tese algorithms start from a random or specified point, and step by step move torwards the closest minima. They often require the partial derivative or the gradient of the function, which requires function to be differentiable. These algorithms are simple and work good for bowl-like functions, thow if there is mor than one minimum in function, it can stock at a local minima, insted of finding the global one.

Examples of the Iterative Algorithms used in this project are:
  • Gradient Descent
    • Batch Gradient Descent
    • Approximated Batch Gradient Descent

Metaheuristic Algorithms

These algorithms start with a set of random solutions, then competetively chose the best solutions from the set and based on them, generate a new set of better solutions, thus evolving each iteration. These algorithms don't stock at local minimums, but directly find the global one, so they can be used for many-local-minimums functions.

Examples of the Metaheuristic Algorithms used in this project are:
  • Harmony Search Algorithm
  • Genetic Algorithm

Benchmark Functions

Benchmark functions are used to test Optimization Algorithms, however they can be used by themselves. There are multiple benchmark functions used in this project, and they are divided into several types depending on their shape.

For more information and the mathematical definition of the functions see: https://www.sfu.ca/~ssurjano/optimization.html

Metadata

Release files for optimisation-algorithms 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for optimisation-algorithms 1.1.2
File Size Uploaded
optimisation_algorithms-1.1.2.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for optimisation-algorithms 1.1.2
File Interpreter ABI Platform
optimisation_algorithms-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 51.1 kB

Release files / optimisation_algorithms-1.1.2.tar.gz

Download URL optimisation_algorithms-1.1.2.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9df021acfa9d35409966d1aa215a50dc0ac5e10cc28b7b0514ac2c67f8fb3be4
BLAKE2b-256 checksum
How to use checksums
1ab903b8afee678db32ac6322496cf0bc17dc4d215035c1b8c93e74808e0d533
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / optimisation_algorithms-1.1.2-py3-none-any.whl

Download URL optimisation_algorithms-1.1.2-py3-none-any.whl
Size 26.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
954811250478e4ab56278b33d7e9d6c2da4c398855b62db0538fa4874e814e76
BLAKE2b-256 checksum
How to use checksums
50d74565340989af64adefed10133ed8d19136ef45760c8ee1787f78a096ec1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release history Release notifications | RSS feed

This release

1.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page