python deap_Python遗传算法框架DEAP-Creating Types

DEAP是一个python遗传算法框架,这里是它的简介。DEAP documentation

今天整理一下DEAP的概览,大体了解一下它的流程。初学,不严谨,仅作为自己的备忘学习笔记。

This tutorial shows how types are created using the creator and initialized using the toolbox.

这个教程展示的是使用creator创建类型和使用toolbox初始化。

Fitness(适应度)

The provided Fitness class is an abstract class that needs a weights attribute in order to be functional. A minimizing fitness is built using negatives weights, while a maximizing fitness has positive weights. For example, the following line creates, in the creator, a ready to use single objective minimizing fitness named FitnessMin.

Fitness类提供了weight属性。最小化问题使用负值的的weight,最大化问题用正值。例如下面的例子,利用creator,创建了一个单目标最小问题,命名为:FitnessMin。

creator.create("FitnessMin", base.Fitness, weights=(-1.0,))

As specified in the Fitness documentation, the weights attribute must be a tuple so that multi-obj

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值