Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 1.77 KB

README.md

File metadata and controls

21 lines (14 loc) · 1.77 KB

NeuralGenetic

This project optimizes the artificial neural network (ANN) parameters using the genetic algorithm (GA) for the classification of the Fruits360 dataset. The implementation is from scratch using NumPy.

This project consists of 3 main Python files which are ANN.py, GA.py, and Example_GA_ANN.py which is the main file from which the other files are imported and called. This file uses 2 supplementary files which are the previously extracted dataset features stored into a file named dataset_features.pkl. The second file is the class labels for all samples which are stored into a file named outputs.pkl.

The Example_GA_ANN.py file reads the features and the class labels files, filters the features based on the standard deviation, creates the ANN architecture, generates the initial solutions, loops through a number of generations by calculating the fitness values for all solutions, selecting best parents, applying crossover and mutation, and finally creating the new population.

Read more about GA

Before going further in this project, I recommend reading about the GA and its implementation in Python from scratch.