Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
OPFUNU (OPtimization benchmark FUnctions in NUmpy) is the largest python library for cutting-edge numerical optimization benchmark functions. Contains all CEC competition functions from 2005, 2008, 2010, 2013, 2014, 2015, 2017, 2019, 2020, 2021, 2022. Besides, more than 300 traditional functions with different dimensions are implemented.
Install the current PyPI release:
$ pip install opfunu
After installation, you can import and check version of Opfunu:
$ python
>>> import opfunu
>>> opfunu.__version__
>>> dir(opfunu)
>>> help(opfunu)
>>> opfunu.FUNC_DATABASE # List all name_based functions
>>> opfunu.CEC_DATABASE # List all cec_based functions
>>> opfunu.ALL_DATABASE # List all functions in this library
>>> opfunu.get_functions_by_classname("CEC2014")
>>> opfunu.get_functions_based_classname("2015")
>>> opfunu.get_functions_by_ndim(30)
>>> opfunu.get_functions_based_ndim(2)
>>> opfunu.get_all_named_functions()
>>> opfunu.get_all_cec_functions()
>>> opfunu.get_functions()
>>> opfunu.get_cecs()
docs
examples
opfunu
cec_based
cec.py
cec2005.py
cec2008.py
...
cec2021.py
cec2022.py
name_based
a_func.py
b_func.py
...
y_func.py
z_func.py
utils
operator.py
validator.py
visualize.py
__init__.py
benchmark.py
README.md
setup.py
Let's go through some examples.
How to get the function and use it
from opfunu.cec_based.cec2014 import F12014
func = F12014(ndim=30)
func.evaluate(func.create_solution())
## or
from opfunu.cec_based import F102014
func = F102014(ndim=50)
func.evaluate(func.create_solution())
import opfunu
funcs = opfunu.get_functions_by_classname("F12014")
func = funcs[0](ndim=10)
func.evaluate(func.create_solution())
## or
all_funcs_2014 = opfunu.get_functions_based_classname("2014")
print(all_funcs_2014)
For more usage examples please look at examples folder.
Official source code repo: https://github.com/thieu1995/opfunu
Official document: https://opfunu.readthedocs.io/
Download releases: https://pypi.org/project/opfunu/
Issue tracker: https://github.com/thieu1995/opfunu/issues
Notable changes log: https://github.com/thieu1995/opfunu/blob/master/ChangeLog.md
Examples with different version: https://github.com/thieu1995/opfunu/blob/master/examples.md
Official chat group: https://t.me/+fRVCJGuGJg1mNDg1
This project also related to our another projects which are optimization and machine learning. Check it here:
If you are using opfunu in your project, we would appreciate citations:
@software{thieu_nguyen_2020_3711682,
author = {Nguyen Van Thieu},
title = {Opfunu: An Open-source Python Library for Optimization Benchmark Functions},
year = 2020,
publisher = {Zenodo},
doi = {10.5281/zenodo.3620960},
url = {https://doi.org/10.5281/zenodo.3620960.}
}
1. http://benchmarkfcns.xyz/fcns
2. https://en.wikipedia.org/wiki/Test_functions_for_optimization
3. https://www.cs.unm.edu/~neal.holts/dga/benchmarkFunction/
4. http://www.sfu.ca/~ssurjano/optimization.html
5. A Literature Survey of Benchmark Functions For Global Optimization Problems (2013)
6. Problem Definitions and Evaluation Criteria for the CEC 2014 Special Session and Competition on Single Objective Real-Parameter Numerical Optimization
FAQs
Opfunu: An Open-source Python Library for Optimization Benchmark Functions
We found that opfunu demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.