- Generate population of solutions for the genetic algorithm (GA).
- For each candidate solution, initialize and train a neural network with those corresponding weights.
- Test each trained neural network using some validation data.
- Compute some measure of error or accuracy (i.e., fitness) of the networks on the validation data.
- Use the fitness scores to rank the population.
- Apply GA operators (e.g., crossover, mutation, elitism) to create next generation of solutions.
- Repeat steps 2-7 until some stopping criterion is met.
i am using ga to find the initial weight of ann, So i need know about the fitness function?
3 views (last 30 days)
Matthew Eicholtz on 12 May 2017
It sounds like you need to decide on a fitness function to evaluate candidate solutions provided by the genetic algorithm. Perhaps the easiest function is whatever you would use during training of the neural network (e.g., sum of the squared error on training data).
Here is just one of many potential solutions to this problem:
Does this help?