Skip to content

Genetic Algorithm in Machine Learning, MDL | Spring 2021

License

Notifications You must be signed in to change notification settings

psahithireddy/Genetic-Algorithm

 
 

Repository files navigation

Genetic Algorithm

done as a project in Machine Data and Learning course, MDL | Spring 2021

Genetic algorithm is often used in parameter selection and obtaining optimal solutions. We have been given coefficients of features(a vector of size 11) corresponding to an overfit model and our task is to apply genetic algorithm in order to reduce the overfitting i.e. generalize the model so that the model performs better on unseen data.

TO RUN

  • python3 json_dump.py
  • python3 main.py

Each run you get only one generation, no.of times you run is no.of generations you run.Make generations==0 in line 138 from second run.

SUMMARY OF ALGORITHM

The genetic algorithm is a search heuristic that is inspired by Charles Darwin’s theory of natural evolution. This algorithm reflects the process of natural selection where the fittest individuals are selected for reproduction in order to produce offspring of the next generation.

Five phases are considered in a genetic algorithm.

  • Initial population
  • Fitness function
  • Selection
  • Crossover
  • Mutation

see report for more details.

About

Genetic Algorithm in Machine Learning, MDL | Spring 2021

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 53.3%
  • Python 46.7%