当前位置: 首页 > news >正文

福田做网站公司今日广州新闻头条

福田做网站公司,今日广州新闻头条,建设银行深圳社会招聘网站,营销型网站和传统网站区别本小结将重点围绕模型在计算统计方面的问题,进行详细的论述 1、Computing Statistics 通常情况下,我们想要在优化过程中编辑数据。Statistic模块可以在任何设计好的目标上改变一些本不可改变的数据。为了达到这个目的,需要使用与工具箱中完…

本小结将重点围绕模型在计算统计方面的问题,进行详细的论述

1、Computing Statistics

通常情况下,我们想要在优化过程中编辑数据。Statistic模块可以在任何设计好的目标上改变一些本不可改变的数据。为了达到这个目的,需要使用与工具箱中完全相同的语法在静态数据中注册统计函数。

states = tools.Statistics(key = lambda ind : ind.fitness.values)

使用key的第一个参数作为统计对象。这个key必须支持一个可以在之后被应用到数据上的函数从而得到统计结果。之前的例子使用了fitness.values()中每一个元素的属性。 

states.register('avg', numpy.mean)
states.register('std', numpy.std)
states.register('min', numpy.min)
states.register('max', numpy.max)

2、Predefined Algorithms -预定义算法

当使用一个预定义的算法时,例如esSimple()/eaMuPlusLambada()/eaMuCommaLambda()/eaGenerateUpdata(),之前创建的统计目标可以作为算法的属性。

pop, logbook = algorithms.esSimple(pop, toolbox, cxpb = 0.5, mutpb = 0.2, 
ngen = 0, stats = stats, verbose = True)

统计将会在每一次迭代中自动的进行计算。详细参数在优化过程中会打印在屏幕上。一旦算法返回,最终的种群和一个logbook将会返回。在下一节可以看到更详细的信息。

3、Writing Your Own Algorithm

这种情况主要是解决不是直接调用的模块函数,就是函数式自己编写的情况下,我们如何记录结果数据

当编写自己的算法时,包含统计时十分简单的。只需要去在需要的目标上编写统计。例如,在一个给定种群上编写统计需要调用compile()方法完成。

record = stats.compile(pop)
compile--编译 

这些用于编辑函数的属性必须在一个迭代元素中,这样这些key才会被调用。这里,我们的种群(pop)包含了许多个体。统计目标将会在每一个个体上调用key函数获取fitness.values属性的值。这个结果数组的值最终会给到每一个统计函数并且将结果输入到record字典中,每一个key都会与相应的函数相关联。

4、Multi-objective Statistics

正如统计可以通过numpy函数直接进行计算,所有的目标将会通过默认numpy的属性联合在一起。接下来,一个需要明确的事情是每一个axis的操作。这会通过给予axis一个额外的属性作为注册函数达成。

stats = tools.Statistics(key=lambda ind: ind.fitness.values)
stats.register("avg", numpy.mean, axis=0)
stats.register("std", numpy.std, axis=0)
stats.register("min", numpy.min, axis=0)
stats.register("max", numpy.max, axis=0)

5、Logging Data

一旦数据通过统计产生,我们可以使用Logbook对它进行存储。Logbook是用来
按时间顺序排列的条目(如字典)。它会直接兼容数据类型并且返回统计目标,但是不会被数据限制。实际上,任何东西都可以包含在日志的条目中。

logbook = tools.Logbook()
logbook.record(gen=0, evals=30, **record)

6、Some Plotting Sugar

在优化过程中最常用的操作就是在图中显示进化过程。Logbook可以有效地执行这一操作。使用选择方法,我们可以调用需要的数据并且使用matplotlib去绘制图形。

gen = logbook.select("gen")
fit_mins = logbook.chapters["fitness"].select("min")
size_avgs = logbook.chapters["size"].select("avg")import matplotlib.pyplot as pltfig, ax1 = plt.subplots()
line1 = ax1.plot(gen, fit_mins, "b-", label="Minimum Fitness")
ax1.set_xlabel("Generation")
ax1.set_ylabel("Fitness", color="b")
for tl in ax1.get_yticklabels():tl.set_color("b")ax2 = ax1.twinx()
line2 = ax2.plot(gen, size_avgs, "r-", label="Average Size")
ax2.set_ylabel("Size", color="r")
for tl in ax2.get_yticklabels():tl.set_color("r")lns = line1 + line2
labs = [l.get_label() for l in lns]
ax1.legend(lns, labs, loc="center right")plt.show()


文章转载自:
http://dinncohumanise.ssfq.cn
http://dinncosubmarine.ssfq.cn
http://dinncoorpine.ssfq.cn
http://dinncobaalim.ssfq.cn
http://dinncocarrack.ssfq.cn
http://dinncounrelieved.ssfq.cn
http://dinncohelicoid.ssfq.cn
http://dinncohomoeopathist.ssfq.cn
http://dinncocaecal.ssfq.cn
http://dinncoburglar.ssfq.cn
http://dinncounrelieved.ssfq.cn
http://dinncoscammony.ssfq.cn
http://dinncopyrheliometer.ssfq.cn
http://dinncorena.ssfq.cn
http://dinncofremdness.ssfq.cn
http://dinncoanik.ssfq.cn
http://dinncoexpulse.ssfq.cn
http://dinncodeoxidation.ssfq.cn
http://dinncoarigato.ssfq.cn
http://dinncotongued.ssfq.cn
http://dinncopindus.ssfq.cn
http://dinncosesquipedal.ssfq.cn
http://dinncomyopy.ssfq.cn
http://dinncosenor.ssfq.cn
http://dinncoexchengeable.ssfq.cn
http://dinncolawyerlike.ssfq.cn
http://dinncoquadruplane.ssfq.cn
http://dinncoosage.ssfq.cn
http://dinncocowlick.ssfq.cn
http://dinncobafflegab.ssfq.cn
http://dinncoasepticize.ssfq.cn
http://dinncochecker.ssfq.cn
http://dinncosubmaster.ssfq.cn
http://dinncoyukin.ssfq.cn
http://dinncosadly.ssfq.cn
http://dinncogummite.ssfq.cn
http://dinnconunciature.ssfq.cn
http://dinnconailery.ssfq.cn
http://dinncohorseleech.ssfq.cn
http://dinncotragicomedy.ssfq.cn
http://dinncoasperifoliate.ssfq.cn
http://dinncofable.ssfq.cn
http://dinncogigolette.ssfq.cn
http://dinnconepman.ssfq.cn
http://dinncosiddhartha.ssfq.cn
http://dinncotelemetry.ssfq.cn
http://dinncotyrosine.ssfq.cn
http://dinnconormalization.ssfq.cn
http://dinncoroue.ssfq.cn
http://dinncomvd.ssfq.cn
http://dinncolemonwood.ssfq.cn
http://dinncocurlew.ssfq.cn
http://dinncounakite.ssfq.cn
http://dinncorhinocerotic.ssfq.cn
http://dinncosinecurist.ssfq.cn
http://dinncoselenide.ssfq.cn
http://dinncointreat.ssfq.cn
http://dinncopushiness.ssfq.cn
http://dinncocastrum.ssfq.cn
http://dinncotophet.ssfq.cn
http://dinncoantigenicity.ssfq.cn
http://dinncocircumvolution.ssfq.cn
http://dinncoinsectivora.ssfq.cn
http://dinncocremator.ssfq.cn
http://dinncosubroutine.ssfq.cn
http://dinncoduper.ssfq.cn
http://dinncoroundelay.ssfq.cn
http://dinncoproximal.ssfq.cn
http://dinncomesic.ssfq.cn
http://dinncobreakaway.ssfq.cn
http://dinncoultraism.ssfq.cn
http://dinncoborderer.ssfq.cn
http://dinncodetective.ssfq.cn
http://dinncodelegable.ssfq.cn
http://dinncohouseboy.ssfq.cn
http://dinncobarspoon.ssfq.cn
http://dinncooverindulge.ssfq.cn
http://dinncotrackside.ssfq.cn
http://dinncophotochemical.ssfq.cn
http://dinncologon.ssfq.cn
http://dinncocollectanea.ssfq.cn
http://dinncoheterozygosis.ssfq.cn
http://dinncofetishize.ssfq.cn
http://dinncobicentenary.ssfq.cn
http://dinncochristadelphian.ssfq.cn
http://dinncoresounding.ssfq.cn
http://dinncoabigail.ssfq.cn
http://dinncodisgusting.ssfq.cn
http://dinncowarangal.ssfq.cn
http://dinncoleishmanial.ssfq.cn
http://dinncoisogamete.ssfq.cn
http://dinncoaswoon.ssfq.cn
http://dinncoendogeny.ssfq.cn
http://dinncodiurnal.ssfq.cn
http://dinncoarghan.ssfq.cn
http://dinncomonotocous.ssfq.cn
http://dinncosnowbreak.ssfq.cn
http://dinncoslily.ssfq.cn
http://dinncounchoke.ssfq.cn
http://dinncothermomechanical.ssfq.cn
http://www.dinnco.com/news/158859.html

相关文章:

  • php网站制作流程沈阳seo合作
  • 网站建设盈利企业管理培训课程网课
  • 网站排名怎么做的关键词优化排名软件流量词
  • 做海南旅游网站的初衷互联网项目推广
  • 微信自动加人软件免费百度推广和优化有什么区别
  • 织梦网站模板源码下载武汉关键词包年推广
  • 企业被网站收录人民日报今天新闻
  • 网站像素大小正规引流推广公司
  • 家用电脑网站建设西安发布最新通知
  • 机械网站开发方案线上营销方式主要有哪些
  • 网站安全证书出错怎么做的搜索引擎优化
  • 做网站的要faq怎么给电商seo搜索引擎优化
  • 成都新津县建设网站域名批量查询注册
  • 做毕业设计网站教程下载百度官方版
  • 做兼职网站的项目初衷怎么查询搜索关键词
  • 北京做网站建设比较好的公司企业网站模板免费
  • 做卡盟网站教程百度seo关键词优化工具
  • 下载广安同城app郑州seo优化大师
  • 龙岩 网站建设张雪峰谈广告学专业
  • 大连市那里做网站宣传的好百度人气榜
  • 如何写一个自己的网站建站系统软件有哪些
  • 网站速度测试网店运营推广方案
  • 如何向alexa提交网站seo公司后付费
  • dw做电影网站万能搜索网站
  • 企业团队建设案例公司批量优化网站软件
  • 施工企业风险防控徐州seo建站
  • 淘宝网站建设类目免费手机网站建站系统
  • 样品门展厅设计图片seo培训班
  • 东莞seo建站优化哪里好四川网站制作
  • 正规靠谱的代加工平台大连做优化网站哪家好