A wrapper-based framework for pymoo problem modification and algorithm benchmarking. Initially developed to test KNN-averaging1.
Simply run
pip install nmooSee
example.ipynb
for a quick example.
For larger benchmarks, you may want to use nmoo's CLI. First, create a module,
say example.py,
containing your benchmark factory (a function that returns your
benchrmark),
say make_benchmark(). Then, run it using
python -m nmoo run --verbose 10 example:make_benchmarkRefer to
python -m nmoo --helpfor more information.
nmoo.benchmark.Benchmark: ABenchmarkobject represents... a benchmark 🤔. At construction, you can specify problems and algorithms to run, how many times to run them, what performance indicators to compute, etc. Refer tonmoo.benchmark.Benchmark.__init__for more details.nmoo.wrapped_problem.WrappedProblem: The main idea ofnmoois to wrap problems in layers. Each layer should redefinepymoo.Problem._evaluateto intercept calls to the wrapped problem. It is then possible to apply/remove noise, keep a call history, log, etc.nmoo.denoisers: Sublasses ofnmoo.wrapped_problem.WrappedProblemthat implement denoising algorithms. In a simple scenario, a synthetic problem would be wrapped in a noise layer, and further wrapped in a denoising layer to test the performance of the latter.nmoo.noises: Sublasses ofnmoo.wrapped_problem.WrappedProblemthat apply noise.
python3.8or newer;requirements.txtfor runtime dependencies;requirements.dev.txtfor development dependencies (optional);make(optional).
Simply run
virtualenv venv -p python3.8
. ./venv/bin/activate
pip install -r requirements.txt
pip install -r requirements.dev.txtSimply run
make docsThis will generate the HTML doc of the project, and the index file should be at
docs/index.html. To have it directly in your browser, run
make docs-browserDon't forget to run
maketo format the code following black, typecheck it using mypy, and check it against coding standards using pylint.
Footnotes
-
Klikovits, S., Arcaini, P. (2021). KNN-Averaging for Noisy Multi-objective Optimisation. In: Paiva, A.C.R., Cavalli, A.R., Ventura Martins, P., Pérez-Castillo, R. (eds) Quality of Information and Communications Technology. QUATIC 2021. Communications in Computer and Information Science, vol 1439. Springer, Cham. https://doi.org/10.1007/978-3-030-85347-1_36 ↩