python DEAP学习4(遗传算法)函数使用
来源:互联网 发布:家具淘宝店铺头像设计 编辑:程序博客网 时间:2024/06/08 03:46
Evolutionary Tools
The tools
module contains the operators for evolutionary algorithms. They are used to modify, select and move the individuals in their environment. The set of operators it contains are readily usable in the Toolbox
. In addition to the basic operators this module also contains utility tools to enhance the basic algorithms with Statistics
, HallOfFame
, and History
.
tools模块中toolbox里面包含遗传算法的操作算子,可以用来选择个体、使个体发生变异或者直接删除个体,另外还有一些基本操作在Statistics、HallOfFame和History里面。
Operators
The operator set does the minimum job for transforming or selecting individuals. This means, for example, that providing two individuals to the crossover will transform those individuals in-place. The responsibility of making offspring(s) independent of their parent(s) and invalidating the fitness is left to the user and is generally fulfilled in the algorithms by calling toolbox.clone()
on an individual to duplicate it and del
on the values
attribute of the individual’s fitness to invalidate it.
Here is a list of the implemented operators in DEAP,
下面是DEAP里面内的操作算子,看起来很强大...怎么用还是慢慢摸索吧....
initRepeat()
cxOnePoint()
mutGaussian()
selTournament()
migRing()
initIterate()
cxTwoPoint()
mutShuffleIndexes()
selRoulette()
initCycle()
cxUniform()
mutFlipBit()
selNSGA2()
cxPartialyMatched()
mutPolynomialBounded()
selSPEA2()
cxUniformPartialyMatched()
mutUniformInt()
selRandom()
cxOrdered()
mutESLogNormal()
selBest()
cxBlend()
selWorst()
cxESBlend()
selTournamentDCD()
cxESTwoPoint()
selDoubleTournament()
cxSimulatedBinary()
selStochasticUniversalSampling()
cxSimulatedBinaryBounded()
selLexicase()
cxMessyOnePoint()
selEpsilonLexicase()
selAutomaticEpsilonLexicase()
and genetic programming specific operators.Initialization Crossover Mutation Bloat control
genFull()
cxOnePoint()
mutShrink()
staticLimit()
genGrow()
cxOnePointLeafBiased()
mutUniform()
selDoubleTournament()
genHalfAndHalf()
mutNodeReplacement()
mutEphemeral()
mutInsert()
Initialization
deap.tools.
initRepeat
(container, func, n)Call the function container with a generator function corresponding to the calling n times the function func.
Parameters: - container – The type to put in the data from func.
- func – The function that will be called n times to fill the container.
- n – The number of times to repeat func.
Returns: An instance of the container filled with data from func.
This helper function can can be used in conjunction with a Toolbox to register a generator of filled containers, as individuals or population.
>>> initRepeat(list, random.random, 2) ... [0.4761..., 0.6302...]
deap.tools.
initIterate
(container, generator)Call the function container with an iterable as its only argument. The iterable must be returned by the method or the object generator.
- container – The type to put in the data from func.
- generator – A function returning an iterable (list, tuple, ...), the content of this iterable will fill the container.
An instance of the container filled with data from the generator.
This helper function can can be used in conjunction with a Toolbox to register a generator of filled containers, as individuals or population.
看一天累了....未完待续....
- python DEAP学习4(遗传算法)函数使用
- python DEAP学习2(遗传算法) 最大值问题
- python DEAP学习1(遗传算法) 概览
- python DEAP学习3(遗传算法) 0-1背包问题
- Deap: python中的遗传算法工具箱
- python DEAP PSO 算法的学习
- Deap : 遗传算法算法解决 背包问题
- python 的 DEAP框架学习
- pso-svm 算法实现(1):python DEAP
- 使用Python实现遗传算法
- 遗传算法(python版)
- 最大流问题 (使用遗传算法解决 --Python 实现)
- 遗传算法Python实现
- python遗传算法模块
- 遗传算法函数优化程序(C++)
- 遗传算法的初步学习(一)
- 遗传算法学习笔记
- 遗传算法学习总结
- 高效程序员应该养成的七个习惯
- 计时器应用
- Python 封装,继承,多态
- Java集合框架List入门学习
- openstack 原版部署问题解决合集(待完善)
- python DEAP学习4(遗传算法)函数使用
- spring rest 增删改查(put\delete\post\get)简单示例详细讲解
- C#委托的介绍(delegate、Action、Func、predicate)
- 11 程序员的发展方向和薪水
- ARP协议与RARP协议
- Ubuntu设置Static IP的方法Ifconfig网络配置工具详解
- 高级CSS filters
- 虚拟机下 linux 连接网络并设置固定ip
- MVP模型复杂视图的思考