i am using ga to find the initial weight of ann, So i need know about the fitness function?

1 次查看(过去 30 天)
i want to find the initial weight of ann by using genetic algorithm. i have multiple input to ann. how i link ann and ga to perform my task.

采纳的回答

Matthew Eicholtz
Matthew Eicholtz 2017-5-12
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:
  1. Generate population of solutions for the genetic algorithm (GA).
  2. For each candidate solution, initialize and train a neural network with those corresponding weights.
  3. Test each trained neural network using some validation data.
  4. Compute some measure of error or accuracy (i.e., fitness) of the networks on the validation data.
  5. Use the fitness scores to rank the population.
  6. Apply GA operators (e.g., crossover, mutation, elitism) to create next generation of solutions.
  7. Repeat steps 2-7 until some stopping criterion is met.
Does this help?
  3 个评论
Matthew Eicholtz
Matthew Eicholtz 2017-5-12
Not that I am aware of, but you can check the File Exchange. For a problem as challenging as this, I wouldn't expect to find something that you can use out-of-the-box. I suggest taking it one step at a time, and after attempting to write some code for a given part of the algorithm, post another specific question if you still need help.
Greg Heath
Greg Heath 2017-5-15
It is rare that you cannot find helpful posts in both the NEWSREADER and ANSWERS. A few search-word examples
greg neural genetic
greg neural ga
neural genetic
neural ga
Hope this helps.
Greg

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Genetic Algorithm 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by