I am just starting use DEAP. Previously, I used GA based on Matlab that after crossover and mutation is to select the better individuals with specified size, and then updating the population. But it is quite hard for me to understand that why in DEAP the evaluate the individuals with an invalid fitness is needed after the crossover and mutation procedure:
invalid_ind = [ind for ind in offspring if not ind.fitness.valid]
fitnesses = map(toolbox.evaluate, invalid_ind)
for ind, fit in zip(invalid_ind, fitnesses):
ind.fitness.values = fit
I tried that deleting those code, but it seems the algorithm will never convergence. And even I did't see those can updating the population/offspring, so what are those use for. Many thanks in advance!!!
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Dear Francois,
Many thanks for the replying. For example, It will convergent after 20 generations with those code, but it converging after more than 20000 generations without those code.
So it may not only save the processing, but also updating the population/offspring?
Best Regards,
Zhida
发件人: François-Michel De Rainville
发送时间: 2017年6月22日 22:21
收件人: deap-users
主题: Re: [deap-users] What's the importance of invalid fitness in DEAP?
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/_M2lKIQT4LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+...@googlegroups.com.
Dear Francois,
Many thanks for the replying. For example, It will convergent after 20 generations with those code, but it converging after more than 20000 generations without those code.
So it may not only save the processing, but also updating the population/offspring?
Best Regards,
Zhida
发件人: François-Michel De Rainville
发送时间: 2017年6月22日 22:21
收件人: deap-users
主题: Re: [deap-users] What's the importance of invalid fitness in DEAP?
It is only to save processing. It should still converge without it. Male sure you are evaluating the right list of individuals.
Le 22 juin 2017 3:50 PM, "Zhida Deng" <z.deng...@gmail.com> a écrit :
I am just starting use DEAP. Previously, I used GA based on Matlab that after crossover and mutation is to select the better individuals with specified size, and then updating the population. But it is quite hard for me to understand that why in DEAP the evaluate the individuals with an invalid fitness is needed after the crossover and mutation procedure:
invalid_ind = [ind for ind in offspring if not ind.fitness.valid]fitnesses = map(toolbox.evaluate, invalid_ind)for ind, fit in zip(invalid_ind, fitnesses):ind.fitness.values = fitI tried that deleting those code, but it seems the algorithm will never convergence. And even I did't see those can updating the population/offspring, so what are those use for. Many thanks in advance!!!
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/_M2lKIQT4LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
It means If I skipped filtering on not valid individuals, I need to write another codes for selecting individuals for evaluation?
Best Regards,
Zhida
发件人: François-Michel De Rainville
发送时间: 2017年6月22日 22:34
收件人: deap-users
主题: Re: 答复: [deap-users] What's the importance of invalid fitness in DEAP?
You still have to do evaluation, you can only skip filtering on not valid individuals.
Le 22 juin 2017 5:32 PM, "Zhida Deng" <z.deng...@gmail.com> a écrit :
Dear Francois,
Many thanks for the replying. For example, It will convergent after 20 generations with those code, but it converging after more than 20000 generations without those code.
So it may not only save the processing, but also updating the population/offspring?
Best Regards,
Zhida
发件人: François-Michel De Rainville
发送时间: 2017年6月22日 22:21
收件人: deap-users
主题: Re: [deap-users] What's the importance of invalid fitness in DEAP?
It is only to save processing. It should still converge without it. Male sure you are evaluating the right list of individuals.
Le 22 juin 2017 3:50 PM, "Zhida Deng" <z.deng...@gmail.com> a écrit :
I am just starting use DEAP. Previously, I used GA based on Matlab that after crossover and mutation is to select the better individuals with specified size, and then updating the population. But it is quite hard for me to understand that why in DEAP the evaluate the individuals with an invalid fitness is needed after the crossover and mutation procedure:
invalid_ind = [ind for ind in offspring if not ind.fitness.valid]fitnesses = map(toolbox.evaluate, invalid_ind)for ind, fit in zip(invalid_ind, fitnesses):ind.fitness.values = fitI tried that deleting those code, but it seems the algorithm will never convergence. And even I did't see those can updating the population/offspring, so what are those use for. Many thanks in advance!!!
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/_M2lKIQT4LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/_M2lKIQT4LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+...@googlegroups.com.
fitnesses = map(toolbox.evaluate, offspring
)
for ind, fit in zip(
offspring, fitnesses):
ind.fitness.values = fit
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/_M2lKIQT4LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "deap-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/deap-users/_M2lKIQT4LE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to deap-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+unsubscribe@googlegroups.com.
To unsubscribe from this group and all its topics, send an email to deap-users+...@googlegroups.com.