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

快速搭建网站wordpress企业网站建设ppt介绍

快速搭建网站wordpress,企业网站建设ppt介绍,网站做的好不好数据,外贸seo网站制作文章目录 [toc]数据集实际值估计值估计误差代价函数学习率参数更新Python实现导包数据预处理迭代过程数据可视化完整代码 线性拟合结果代价结果 个人主页#xff1a;丷从心 系列专栏#xff1a;机器学习 数据集 ( x ( i ) , y ( i ) ) , i 1 , 2 , ⋯ , m \left(x^{(i)} , … 文章目录 [toc]数据集实际值估计值估计误差代价函数学习率参数更新Python实现导包数据预处理迭代过程数据可视化完整代码 线性拟合结果代价结果 个人主页丷从心 系列专栏机器学习 数据集 ( x ( i ) , y ( i ) ) , i 1 , 2 , ⋯ , m \left(x^{(i)} , y^{(i)}\right) , i 1 , 2 , \cdots , m (x(i),y(i)),i1,2,⋯,m 实际值 y ( i ) y^{(i)} y(i) 估计值 h θ ( x ( i ) ) θ 0 θ 1 x ( i ) h_{\theta}\left(x^{(i)}\right) \theta_{0} \theta_{1} x^{(i)} hθ​(x(i))θ0​θ1​x(i) 估计误差 h θ ( x ( i ) ) − y ( i ) h_{\theta}\left(x^{(i)}\right) - y^{(i)} hθ​(x(i))−y(i) 代价函数 J ( θ ) J ( θ 0 , θ 1 ) 1 2 m ∑ i 1 m ( h θ ( x ( i ) ) − y ( i ) ) 2 1 2 m ∑ i 1 m ( θ 0 θ 1 x ( i ) − y ( i ) ) 2 J(\theta) J(\theta_{0} , \theta_{1}) \cfrac{1}{2m} \displaystyle\sum\limits_{i 1}^{m}{\left(h_{\theta}\left(x^{(i)}\right) - y^{(i)}\right)^{2}} \cfrac{1}{2m} \displaystyle\sum\limits_{i 1}^{m}{\left(\theta_{0} \theta_{1} x^{(i)} - y^{(i)}\right)^{2}} J(θ)J(θ0​,θ1​)2m1​i1∑m​(hθ​(x(i))−y(i))22m1​i1∑m​(θ0​θ1​x(i)−y(i))2 学习率 α \alpha α是学习率一个大于 0 0 0的很小的经验值决定代价函数下降的程度 参数更新 Δ θ j ∂ ∂ θ j J ( θ 0 , θ 1 ) \Delta{\theta_{j}} \cfrac{\partial}{\partial{\theta_{j}}} J(\theta_{0} , \theta_{1}) Δθj​∂θj​∂​J(θ0​,θ1​) θ j : θ j − α Δ θ j θ j − α ∂ ∂ θ j J ( θ 0 , θ 1 ) \theta_{j} : \theta_{j} - \alpha \Delta{\theta_{j}} \theta_{j} - \alpha \cfrac{\partial}{\partial{\theta_{j}}} J(\theta_{0} , \theta_{1}) θj​:θj​−αΔθj​θj​−α∂θj​∂​J(θ0​,θ1​) [ θ 0 θ 1 ] : [ θ 0 θ 1 ] − α [ ∂ J ( θ 0 , θ 1 ) ∂ θ 0 ∂ J ( θ 0 , θ 1 ) ∂ θ 1 ] \left[ \begin{matrix} \theta_{0} \\ \theta_{1} \end{matrix} \right] : \left[ \begin{matrix} \theta_{0} \\ \theta_{1} \end{matrix} \right] - \alpha \left[ \begin{matrix} \cfrac{\partial{J(\theta_{0} , \theta_{1})}}{\partial{\theta_{0}}} \\ \cfrac{\partial{J(\theta_{0} , \theta_{1})}}{\partial{\theta_{1}}} \end{matrix} \right] [θ0​θ1​​]:[θ0​θ1​​]−α ​∂θ0​∂J(θ0​,θ1​)​∂θ1​∂J(θ0​,θ1​)​​ ​ [ ∂ J ( θ 0 , θ 1 ) ∂ θ 0 ∂ J ( θ 0 , θ 1 ) ∂ θ 1 ] [ 1 m ∑ i 1 m ( h θ ( x ( i ) ) − y ( i ) ) 1 m ∑ i 1 m ( h θ ( x ( i ) ) − y ( i ) ) x ( i ) ] [ 1 m ∑ i 1 m e ( i ) 1 m ∑ i 1 m e ( i ) x ( i ) ] e ( i ) h θ ( x ( i ) ) − y ( i ) \left[ \begin{matrix} \cfrac{\partial{J(\theta_{0} , \theta_{1})}}{\partial{\theta_{0}}} \\ \cfrac{\partial{J(\theta_{0} , \theta_{1})}}{\partial{\theta_{1}}} \end{matrix} \right] \left[ \begin{matrix} \cfrac{1}{m} \displaystyle\sum\limits_{i 1}^{m}{\left(h_{\theta}\left(x^{(i)}\right) - y^{(i)}\right)} \\ \cfrac{1}{m} \displaystyle\sum\limits_{i 1}^{m}{\left(h_{\theta}\left(x^{(i)}\right) - y^{(i)}\right) x^{(i)}} \end{matrix} \right] \left[ \begin{matrix} \cfrac{1}{m} \displaystyle\sum\limits_{i 1}^{m}{e^{(i)}} \\ \cfrac{1}{m} \displaystyle\sum\limits_{i 1}^{m}{e^{(i)} x^{(i)}} \end{matrix} \right] \kern{2em} e^{(i)} h_{\theta}\left(x^{(i)}\right) - y^{(i)} ​∂θ0​∂J(θ0​,θ1​)​∂θ1​∂J(θ0​,θ1​)​​ ​ ​m1​i1∑m​(hθ​(x(i))−y(i))m1​i1∑m​(hθ​(x(i))−y(i))x(i)​ ​ ​m1​i1∑m​e(i)m1​i1∑m​e(i)x(i)​ ​e(i)hθ​(x(i))−y(i) [ ∂ J ( θ 0 , θ 1 ) ∂ θ 0 ∂ J ( θ 0 , θ 1 ) ∂ θ 1 ] [ 1 m ∑ i 1 m e ( i ) 1 m ∑ i 1 m e ( i ) x ( i ) ] [ 1 m ( e ( 1 ) e ( 2 ) ⋯ e ( m ) ) 1 m ( e ( 1 ) e ( 2 ) ⋯ e ( m ) ) x ( i ) ] 1 m [ 1 1 ⋯ 1 x ( 1 ) x ( 2 ) ⋯ x ( m ) ] [ e ( 1 ) e ( 2 ) ⋮ e ( m ) ] 1 m X T e 1 m X T ( X θ − y ) \begin{aligned} \left[ \begin{matrix} \cfrac{\partial{J(\theta_{0} , \theta_{1})}}{\partial{\theta_{0}}} \\ \cfrac{\partial{J(\theta_{0} , \theta_{1})}}{\partial{\theta_{1}}} \end{matrix} \right] \left[ \begin{matrix} \cfrac{1}{m} \displaystyle\sum\limits_{i 1}^{m}{e^{(i)}} \\ \cfrac{1}{m} \displaystyle\sum\limits_{i 1}^{m}{e^{(i)} x^{(i)}} \end{matrix} \right] \left[ \begin{matrix} \cfrac{1}{m} \left(e^{(1)} e^{(2)} \cdots e^{(m)}\right) \\ \cfrac{1}{m} \left(e^{(1)} e^{(2)} \cdots e^{(m)}\right) x^{(i)} \end{matrix} \right] \\ \cfrac{1}{m} \left[ \begin{matrix} 1 1 \cdots 1 \\ x^{(1)} x^{(2)} \cdots x^{(m)} \end{matrix} \right] \left[ \begin{matrix} e^{(1)} \\ e^{(2)} \\ \vdots \\ e^{(m)} \end{matrix} \right] \cfrac{1}{m} X^{T} e \cfrac{1}{m} X^{T} (X \theta - y) \end{aligned} ​∂θ0​∂J(θ0​,θ1​)​∂θ1​∂J(θ0​,θ1​)​​ ​​ ​m1​i1∑m​e(i)m1​i1∑m​e(i)x(i)​ ​ ​m1​(e(1)e(2)⋯e(m))m1​(e(1)e(2)⋯e(m))x(i)​ ​m1​[1x(1)​1x(2)​⋯⋯​1x(m)​] ​e(1)e(2)⋮e(m)​ ​m1​XTem1​XT(Xθ−y)​ 由上述推导得 Δ θ 1 m X T e \Delta{\theta} \cfrac{1}{m} X^{T} e Δθm1​XTe θ : θ − α Δ θ θ − α 1 m X T e \theta : \theta - \alpha \Delta{\theta} \theta - \alpha \cfrac{1}{m} X^{T} e θ:θ−αΔθθ−αm1​XTe Python实现 导包 import numpy as np import matplotlib.pyplot as plt数据预处理 x np.array([4, 3, 3, 4, 2, 2, 0, 1, 2, 5, 1, 2, 5, 1, 3]) y np.array([8, 6, 6, 7, 4, 4, 2, 4, 5, 9, 3, 4, 8, 3, 6])m len(x)x np.c_[np.ones([m, 1]), x] y y.reshape(m, 1) theta np.zeros([2, 1])迭代过程 alpha 0.01 iter_cnt 1000 # 迭代次数 cost np.zeros([iter_cnt]) # 代价数据for i in range(iter_cnt):h x.dot(theta) # 估计值error h - y # 误差值cost[i] 1 / (2 * m) * error.T.dot(error) # 代价值# 更新参数delta_theta 1 / m * x.T.dot(error)theta - alpha * delta_theta数据可视化 # 回归结果 plt.scatter(x[:, 1], y, cblue) plt.plot(x[:, 1], h, r-) plt.show()# 代价结果 plt.plot(cost) plt.show()完整代码 import numpy as np import matplotlib.pyplot as pltx np.array([4, 3, 3, 4, 2, 2, 0, 1, 2, 5, 1, 2, 5, 1, 3]) y np.array([8, 6, 6, 7, 4, 4, 2, 4, 5, 9, 3, 4, 8, 3, 6])m len(x)x np.c_[np.ones([m, 1]), x] y y.reshape(m, 1) theta np.zeros([2, 1])alpha 0.01 iter_cnt 1000 # 迭代次数 cost np.zeros([iter_cnt]) # 代价数据for i in range(iter_cnt):h x.dot(theta) # 估计值error h - y # 误差值cost[i] 1 / (2 * m) * error.T.dot(error) # 代价值# 更新参数delta_theta 1 / m * x.T.dot(error)theta - alpha * delta_theta# 线性拟合结果 plt.scatter(x[:, 1], y, cblue) plt.plot(x[:, 1], h, r-) plt.show()# 代价结果 plt.plot(cost) plt.show()线性拟合结果 代价结果
http://www.pierceye.com/news/441530/

相关文章:

  • 网站建设是属于软件开发费吗Wordpress有用么
  • 上海 网站备案商务网站规划与建设课程设计
  • 网站 首页 栏目 内容网业设计
  • 用vs与dw做网站什么做电子书下载网站好
  • 网站建设发布教程网页设计师收费标准
  • 徐州哪里做网站好农林网站建设公司
  • 可以做直播卖产品的网站专业产品画册设计公司
  • wp网站开发个人小程序开发流程
  • 网站制作报价大约重庆招聘网站建设
  • 网站开发 资质网站开发价格评估
  • 泰州网站关键词优化谷歌建站
  • 门户网站风格企业网站建设的成本
  • 一站式外贸综合服务平台社区网站推广方案
  • 宁波网络公司网站建设项目怎么破解别人做的付费网站
  • 做创意小视频的网站centos 7.4 wordpress
  • 免费建立单位的网站适合个人做的跨境电商
  • 沈阳军成网站建设17网站一起做网店
  • 哪些cms做同城网站比较好上海建设工程协会网站
  • 潍坊企业自助建站系统seo博客网站
  • 做啤酒最全的网站鱼台县建设局网站
  • 网站开发转行进入衍生领域wordpress qaengine
  • 公司内部网站模板快速建网站的软件
  • 被骗去国外做网站网站推广网站的运营推广方案
  • 北京汽车业务网站开发公司桂林旅游攻略必去景点
  • 个人网站开发是学什么语言wordpress打造cms
  • 网站建设与维护的重要性岳阳建设厅网站
  • 惠州网站开发公司wordpress简单
  • 外贸网站 免费模板 使用 zencart如何购买域名和备案
  • 网站建设联系我们设计网站无锡
  • 深圳做网站好的公司wordpress建菜单