niapy
¶
Python micro framework for building nature-inspired algorithms.
-
class
niapy.
Runner
(dimension=10, max_evals=1000000, runs=1, algorithms='ArtificialBeeColonyAlgorithm', benchmarks='Ackley')[source]¶ Bases:
object
Runner utility feature.
Feature which enables running multiple algorithms with multiple benchmarks. It also support exporting results in various formats (e.g. Pandas DataFrame, JSON, Excel)
- Variables
Initialize Runner.
- Parameters
-
__init__
(dimension=10, max_evals=1000000, runs=1, algorithms='ArtificialBeeColonyAlgorithm', benchmarks='Ackley')[source]¶ Initialize Runner.
-
run
(export='dataframe', verbose=False)[source]¶ Execute runner.
- Parameters
export (str) – Takes export type (e.g. dataframe, json, xls, xlsx) (default: “dataframe”)
verbose (bool) – Switch for verbose logging (default: {False})
- Returns
Returns dictionary of results
- Return type
dict
- Raises
TypeError – Raises TypeError if export type is not supported