Take the 2-minute tour ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

Hi I want to ask about weight selection in neural network using genetic algorithm.

Right now what I understand is

  1. Initialize population
  2. Encode the weight of the neural network to the chromosome
  3. Calculating the error and fitness
  4. crossover and mutation
  5. looping until satisfy the condition

Is it the right thing?

if yes what I'm still not sure are :

  1. If I have 50 chromosome in one population that means I must create 50 neural network?
  2. Let's say I have 100 different input and I want the network to learn it by using weight selection only (not using backpropagation) and how I calculate the error? Testing and calculating the error of every input(using MSE) and divide it by 100?

I think that's all for now

Thank you

share|improve this question

migrated from cstheory.stackexchange.com Jan 7 '13 at 15:30

This question came from our site for theoretical computer scientists and researchers in related fields.

1 Answer 1

up vote 1 down vote accepted

Your understanding is correct.

  1. Yes, you do create a new neural network for each chromosome (although you're considering the network structure as fixed, so technically you could reuse them by just resetting the weights anew for each chromosome.

  2. For the error, you're on the right track. For a GA, generally only relative differences in fitness are important, so it doesn't really matter if you divide by 100 or not -- that's just linearly scaling the fitness values. That might matter for some choices of genetic operators (e.g., roulette-wheel selection can be sensitive to absolute fitness values), but often it won't matter at all.

share|improve this answer
    
Thank you for the answer, but now I already used roulette-wheel selection, and right now I calculate my fitness with this function (1-error(with MSE)) * 100 will it affected how accurate is the result and how long it'll take to achieve convergence? thank you –  nayoso Jan 4 '13 at 12:36
    
As a rule of thumb, I'd avoid roulette wheel selection anyway, as it doesn't allow for control of selection pressure very well. By default, I'd assume binary tournament selection to start with and work from there. Adding a constant to each fitness value will change selection probabilities under roulette wheel, but multiplying by a constant doesn't, as can be shown directly by comparing the selection probabilities directly. f_i / \sum_{j=1}^n f_j for the unscaled version versus 100*f_i / \sum_{j=1}^n 100*f_j with your scaling. As the 100 factors out of each term, the two are equivalent. –  deong Jan 4 '13 at 14:40
    
thank you for your answer! I'll try to use binary tournament selection as you said above :) –  nayoso Jan 4 '13 at 16:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.