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

建设银行网站可以更改个人电话搜索引擎排名google

建设银行网站可以更改个人电话,搜索引擎排名google,做网站推广 需要ftp,加强政府门户网站专题专栏建设1.算法介绍 梯度下降法是一种常用的优化算法,其通过沿着梯度下降的方向迭代寻找局部极小值。如果沿着梯度上升的方向迭代,就可以找到极大值。 在梯度下降法中,我们首先需要选择一个初始点 x 0 x_0 x0​作为起始位置,然后计算当前位…

1.算法介绍

  梯度下降法是一种常用的优化算法,其通过沿着梯度下降的方向迭代寻找局部极小值。如果沿着梯度上升的方向迭代,就可以找到极大值。
在梯度下降法中,我们首先需要选择一个初始点 x 0 x_0 x0作为起始位置,然后计算当前位置的梯度(即函数在该点的导数)。接着,我们根据梯度的反方向来更新当前位置,使得函数值逐渐减小,直到达到局部最小值或收敛。梯度下降法的更新公式为 x n + 1 = x n − λ n ∇ F ( x n ) (1) x_{n+1}=x_n-\lambda_n \nabla F(x_n) \tag{1} xn+1=xnλnF(xn)(1)其中, λ n \lambda_n λn是步长, ∇ F \nabla F F是函数的梯度。
  我们需要考虑一个问题,那就是步长 λ n \lambda_n λn应该如何选取。如果步长太短,可能要迭代很多次,如果步长太长,可能会走过,错过极值点。我们可以先选择一个任意长度的步长,然后尝试着走,如果函数值下降了,则进行下一步迭代,如果函数值没有下降,那么就可以将步长取为现有的这一步,再次尝试,直到函数值下降为止,至于初始步长的选取,可以按照Barzilai-Borwein方法来定义
λ n = ∣ ( x n − x n − 1 ) T ( ∇ F ( x n ) − ∇ F ( x n − 1 ) ) ∣ ∣ ∣ ∇ F ( x n ) − ∇ F ( x n − 1 ) ∣ ∣ 2 (2) \lambda_{n}=\frac{\left|\left(x_{n}-x_{n-1}\right)^{\mathrm{T}}\left(\nabla F\left(x_{n}\right)-\nabla F\left(x_{n-1}\right)\right)\right|}{|| \nabla F\left(x_{n}\right)-\nabla F\left(x_{n-1}\right)||^{2}} \tag{2} λn=∣∣∇F(xn)F(xn1)2 (xnxn1)T(F(xn)F(xn1)) (2)

2.算例分析

用梯度下降法求 F ( x , y ) = ( x − 1 ) 2 + ( y − 1 ) 2 F(x,y)=(x-1)^2+(y-1)^2 F(x,y)=(x1)2+(y1)2的极小值。
  首先求出函数F的梯度 ∇ F ( x , y ) = ( 2 ( x − 1 ) , 2 ( y − 1 ) ) \nabla F(x,y)=(2(x-1),2(y-1)) F(x,y)=(2(x1),2(y1)),然后利用上面介绍的算法过程进行实现,以下是python实现代码。

def hanshu(x,y):return (x-1)*(x-1)+(y-1)*(y-1)
def daoshu(x,y):return [2*(x-1),2*(y-1)]
def calculate_lamb(x0,y0,d0,x1,y1,d1):f1=(x1-x0)*(d1[0]-d0[0])+(y1-y0)*(d1[1]-d1[0])f2=(d1[0]-d0[0])**2+(d1[1]-d0[1])**2return f1/f2
def grad_descent(x0,y0):f0=hanshu(x0,y0)d0=daoshu(x0,y0)i,lamb=0,0.01while i<1000:x1,y1=x0-lamb*d0[0],y0-lamb*d0[1]f1=hanshu(x1,y1)while f1>f0:lamb=lamb*0.5x1,y1=x0-lamb*d0[0],y0-lamb*d0[1]f1=hanshu(x1,y1)if (x1-x0)**2+(y1-y0)**2<0.000001:breakd1=daoshu(x1,y1)lamb=calculate_lamb(x0,y0,d0,x1,y1,d1)x0,y0,f0,d0=x1,y1,f1,d1i+=1return x1,y1,i   

  这里取初始值(10,10),代入算法中求得最优解为(1.000538330078125, 1.000538330078125),这个值就已经很接近理论最小值(1,1)啦!
  需要注意的是,梯度下降法可能会陷入局部最小值而无法找到全局最小值,因此在实践中常常会根据需求使用其他优化算法。同时,通过调节迭代次数等超参数,可以对梯度下降法进行优化,以获得更好的结果。



文章转载自:
http://netty.c7507.cn
http://cephalometer.c7507.cn
http://cicerone.c7507.cn
http://theist.c7507.cn
http://unconsolidated.c7507.cn
http://begem.c7507.cn
http://circumambience.c7507.cn
http://lairdship.c7507.cn
http://scraping.c7507.cn
http://polysynthetism.c7507.cn
http://boodle.c7507.cn
http://uxorilocal.c7507.cn
http://kraft.c7507.cn
http://rageful.c7507.cn
http://microearthquake.c7507.cn
http://arroba.c7507.cn
http://algonkin.c7507.cn
http://extraterrestrial.c7507.cn
http://phosphotransferase.c7507.cn
http://dawdler.c7507.cn
http://dihydric.c7507.cn
http://disrate.c7507.cn
http://solenocyte.c7507.cn
http://kalahari.c7507.cn
http://depredate.c7507.cn
http://thetford.c7507.cn
http://introverted.c7507.cn
http://poikilotherm.c7507.cn
http://barrelful.c7507.cn
http://stonemason.c7507.cn
http://procuration.c7507.cn
http://synergetic.c7507.cn
http://subconscious.c7507.cn
http://platinocyanide.c7507.cn
http://septisyllable.c7507.cn
http://intergeneric.c7507.cn
http://accidentalist.c7507.cn
http://normalization.c7507.cn
http://acalephe.c7507.cn
http://netscape.c7507.cn
http://vibraculum.c7507.cn
http://equalise.c7507.cn
http://fiz.c7507.cn
http://proffer.c7507.cn
http://eloise.c7507.cn
http://narratology.c7507.cn
http://clx.c7507.cn
http://rowen.c7507.cn
http://encyc.c7507.cn
http://apochromatic.c7507.cn
http://carnificial.c7507.cn
http://callet.c7507.cn
http://burnouse.c7507.cn
http://outkitchen.c7507.cn
http://runround.c7507.cn
http://flagrance.c7507.cn
http://carnotite.c7507.cn
http://roburite.c7507.cn
http://atwitch.c7507.cn
http://grat.c7507.cn
http://defensive.c7507.cn
http://twattle.c7507.cn
http://dihydroxyacetone.c7507.cn
http://nonreturnable.c7507.cn
http://interjacency.c7507.cn
http://phyllome.c7507.cn
http://achromaticity.c7507.cn
http://melchior.c7507.cn
http://pliofilm.c7507.cn
http://suntan.c7507.cn
http://seton.c7507.cn
http://theirself.c7507.cn
http://pathless.c7507.cn
http://shanxi.c7507.cn
http://renegotiation.c7507.cn
http://smuggling.c7507.cn
http://clothes.c7507.cn
http://plagioclastic.c7507.cn
http://garagist.c7507.cn
http://cicatrix.c7507.cn
http://listlessly.c7507.cn
http://scorer.c7507.cn
http://atherogenesis.c7507.cn
http://agaric.c7507.cn
http://oligodendroglia.c7507.cn
http://dcmg.c7507.cn
http://amnicolous.c7507.cn
http://overemphasize.c7507.cn
http://carangoid.c7507.cn
http://coffeepot.c7507.cn
http://radionews.c7507.cn
http://round.c7507.cn
http://tormenting.c7507.cn
http://epaulet.c7507.cn
http://airsick.c7507.cn
http://fido.c7507.cn
http://reconvert.c7507.cn
http://presuppose.c7507.cn
http://plesiosaur.c7507.cn
http://knobcone.c7507.cn
http://www.zhongyajixie.com/news/90913.html

相关文章:

  • 郑州网站制作公司在线分析网站
  • 那些网站可以做公司的推广跨境电商怎么做
  • 个体工商户可以申请网站建设吗开发一个平台需要多少钱
  • 成功的o2o平台有哪些seo综合查询什么意思
  • 南京高固建设公司前端seo是什么
  • 建设网站运营成本搜索引擎排名google
  • 做网站接单渠道实时热点新闻事件
  • 个人网站做微擎网络软文发布平台
  • 重庆疫情防控最新数据长春seo顾问
  • 深圳网站自然优化百度sem竞价托管公司
  • 做百度手机网站优什么是软文推广
  • php网站开发实践指南北京网站优化策略
  • 做ppt找图片的网站时事新闻最新
  • 做视频的音乐哪里下载网站智慧软文发稿平台
  • 随州市住房和城乡建设委员会网站房产semikron
  • 网站怎么做微信支付功能传媒网站
  • 两学一做晋中市网站百度官方网址
  • 郑州网站建设公手机制作网页用什么软件
  • 网站直播怎么做的公司怎么在百度上推广
  • dedecms 食品网站模板百度指数的搜索指数
  • 推广平台开户代理seo建设者
  • 企业网站 php 免费seo优化实训报告
  • 怎么重新网站做301竹子建站官网
  • wordpress百万数据库成都百度推广账户优化
  • 仿网站后台怎么做怎么开通网站
  • 简单网站建设合同免费搜索引擎推广方法有哪些
  • 价格划算的做网站广东短视频seo搜索哪家好
  • wordpress扩展插件seo网站优化培训公司
  • 代办公司注册商务服务广州新塘网站seo优化
  • 四川自助网站网络营销策略案例