modifiedga
Modified version of a genetic algorithm developed for optimization problems with correlated variables.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.4%) to scientific vocabulary
Keywords
Repository
Modified version of a genetic algorithm developed for optimization problems with correlated variables.
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 1
Topics
Metadata Files
README.md
modifiedGA (mGA)
This Python module comprises a modified Genetic Algorithm where a new intermediate step, gene variation, is introduced, and a mutation defined by a Gaussian distribution with a standard deviation that adjusts based on the results of each generation. It is capable of optimizing multiple parameters (even in cases of correlation between them - in such instances, it is advisable to maintain a high number of generations).
Mathematical background and performance test: click here
Installation:
Download the latest release, extract it, enter the extracted file, and run the following command via the console.
console
python setup.py install
Setting the optimization object
python
mGA = modifiedGA.algorithm( popSize, nGen, nVar, mins, maxs, problem, optimType, info )
Required parameters:
* popSize : Population size (must be at least 10)
* nGen : Number of generations
* nVar : Number of variables
* mins : Minimum value in the parameter space of possible values for the variables
* maxs : Maximum value in the parameter space of possible values for the variables
* problem : The function to be used in optimization
[!IMPORTANT] * The values of
minsandmaxsshould consist of as many asnVarvalue. * Theproblemshould take list of variables as parameters and return the result of the function.
Non-required parameters:
* seed (integer) : Sets the initial value of the random number generator as a function of the given number. Using the same seed will always yield the same result.
* optimType : Optimization type - 'minimum' or 'maximum' (defaul value is 'minimum')
* 'minimum', optimizes the problem to the minimum value.
* 'maximum', optimizes the problem to the maximum value.
* info (bool) : Enable or disable showing information during calculation (default value is True).
Optimizing and getting results
python
results, values = mGA.optimize()
It returns the most optimal result and the parameters associated with this results.
Saving the results
python
mGA.saveResults( name, graph, xlabel, ylabel, title )
Non-required parameters:
* name : Name of the file/graph which the results will be written (default value is "results")
* graph : Specifies whether to create a plot (default value is False)
* xlabel : Label of the x-axis on the graph (default value is "Generations")
* ylabel : Label of the y-axis on the graph (default value is "Fitness")
* title : Title of the graph (default is empty)
[!IMPORTANT] The matplotlib module must be installed to plot graphs
Owner
- Name: Ali Can Canbay
- Login: acanbay
- Kind: user
- Location: Ankara
- Company: Ankara University
- Repositories: 1
- Profile: https://github.com/acanbay
Citation (CITATION.cff)
cff-version: 1.2.0
title: 'modifiedGA'
version: 0.1.0
abstract: This Python module comprises a modified Genetic Algorithm where a new intermediate step, gene variation, is introduced, and a mutation defined by a Gaussian distribution with a standard deviation that adjusts based on the results of each generation. It is capable of optimizing multiple parameters (even in cases of correlation between them - in such instances, it is advisable to maintain a high number of generations).
message: If you use this software, please cite it using these metadata.
authors:
- family-names: Canbay
given-names: Ali Can
orcid: "https://orcid.org/0000-0003-4602-473X"
date-released: '2024-27-06'
doi: 10.5281/zenodo.12569505
license: GPL-3.0-only
type: software
identifiers:
- description: Zenodo release
type: doi
value: "10.5281/zenodo.12569505"
GitHub Events
Total
Last Year
Dependencies
- matplotlib ==3.6.3