MCPcopy Create free account

hub / github.com/ahmedfgad/GARI / functions

Functions14 in github.com/ahmedfgad/GARI

↓ 2 callersFunctionchromosome2img
First step in GA is to represent the input in a sequence of characters. The encoding used is value encoding by giving each gene in the chro
TutorialProject/GARI.py:57
↓ 1 callersFunctionfitness_fun
Calculating the fitness of a single solution. The fitness is basicly calculated using the sum of absolute difference between genes va
TutorialProject/GARI.py:66
Functioncal_pop_fitness
This method calculates the fitness of all solutions in the population.
TutorialProject/GARI.py:81
Functioncallback
(ga_instance)
example.py:42
Functionchromosome2img
Converts a 1D vector into an array. vector: The vector to be converted into an array. shape: The shape of the target array.
gari.py:16
Functioncrossover
Applying crossover operation to the set of currently selected parents to create a new generation.
TutorialProject/GARI.py:110
Functionfitness_fun
Calculating the fitness value for a solution in the population. The fitness value is calculated using the sum of absolute difference betwee
example.py:27
Functionimg2chromosome
Represents the image as a 1D vector. img_arr: The image to be converted into a vector. Returns the vector.
gari.py:5
Functionimg2chromosome
First step in GA is to represent/encode the input as a sequence of characters. The encoding used is value encoding by giving each gene in t
TutorialProject/GARI.py:31
Functioninitial_population
Creating an initial population randomly.
TutorialProject/GARI.py:43
Functionmutation
Applying mutation by selecting a predefined percent of genes randomly. Values of the randomly selected genes are changed randmly.
TutorialProject/GARI.py:158
Functionsave_images
Saving best solution in a given generation as an image in the specified directory. Images are saved accoirding to stop points to avoid savi
TutorialProject/GARI.py:173
Functionselect_mating_pool
Selects the best individuals in the current generation, according to the number of parents specified, for mating and generating a new bett
TutorialProject/GARI.py:91
Functionshow_indivs
Show all individuals as image in a single graph.
TutorialProject/GARI.py:189