• 不是一个机器学习算法
  • 是一种基于搜索的优化方法
  • 作用:最小化一个损失函数
  • 梯度上升法:最大化一个效用函数
import matplotlib.pyplot as plt
import numpy as np
plot_x = np.linspace(-1, 6, 141)
# 损失函数
plot_y = (plot_x - 2.5) ** 2 - 1
plt.plot(plot_x, plot_y)
plt.scatter(plot_x[:70:10], plot_y[: 大专栏  Introduction Of Gradient Descent70:10])
plt.xlabel("param theta")
plt.ylabel("loss func J")
plt.show()

  • 在直线和曲线方程中,导数代表切线的斜率
  • 导数代表theta单位变化时,J相应的变化
  • 导数可以代表方向,对应J增大的方向

我们将θ向导数小的方向移动,来获得极值,如下式

  • η被称为学习率(learning rate)
  • η的取值影响获得最优解的速度
  • η取值不合适,设置得不到最优解
  • η是梯度下降法的一个超参数

η取值影响

  • 过小,收敛速度慢
  • 过大,可能导致不收敛

注意

  • 并不是所有函数都有唯一的极值点(可能会找到局部最优解,并不是全局最优解)
  • 多次运行,随机化初始点
  • 梯度下降法的初始点也是一个超参数

Introduction Of Gradient Descent的更多相关文章

  1. (转)Introduction to Gradient Descent Algorithm (along with variants) in Machine Learning

    Introduction Optimization is always the ultimate goal whether you are dealing with a real life probl ...

  2. (转) An overview of gradient descent optimization algorithms

    An overview of gradient descent optimization algorithms Table of contents: Gradient descent variants ...

  3. 机器学习-随机梯度下降(Stochastic gradient descent)

    sklearn实战-乳腺癌细胞数据挖掘(博主亲自录制视频) https://study.163.com/course/introduction.htm?courseId=1005269003& ...

  4. An overview of gradient descent optimization algorithms

    原文地址:An overview of gradient descent optimization algorithms An overview of gradient descent optimiz ...

  5. 【论文翻译】An overiview of gradient descent optimization algorithms

    这篇论文最早是一篇2016年1月16日发表在Sebastian Ruder的博客.本文主要工作是对这篇论文与李宏毅课程相关的核心部分进行翻译. 论文全文翻译: An overview of gradi ...

  6. 梯度下降(Gradient Descent)小结

    在求解机器学习算法的模型参数,即无约束优化问题时,梯度下降(Gradient Descent)是最常采用的方法之一,另一种常用的方法是最小二乘法.这里就对梯度下降法做一个完整的总结. 1. 梯度 在微 ...

  7. 机器学习基础——梯度下降法(Gradient Descent)

    机器学习基础--梯度下降法(Gradient Descent) 看了coursea的机器学习课,知道了梯度下降法.一开始只是对其做了下简单的了解.随着内容的深入,发现梯度下降法在很多算法中都用的到,除 ...

  8. 线性回归、梯度下降(Linear Regression、Gradient Descent)

    转载请注明出自BYRans博客:http://www.cnblogs.com/BYRans/ 实例 首先举个例子,假设我们有一个二手房交易记录的数据集,已知房屋面积.卧室数量和房屋的交易价格,如下表: ...

  9. Proximal Gradient Descent for L1 Regularization

    [本文链接:http://www.cnblogs.com/breezedeus/p/3426757.html,转载请注明出处] 假设我们要求解以下的最小化问题:                     ...

随机推荐

  1. POJ 3585 Accumulation Degree【换根DP】

    传送门:http://poj.org/problem?id=3585 题意:给定一张无根图,给定每条边的容量,随便取一点使得从这个点出发作为源点,发出的流量最大,并且输出这个最大的流量. 思路:最近开 ...

  2. [ZJOI2019]开关(生成函数+背包DP)

    注:以下p[i]均表示概率 设F(x)为按i次开关后到达终止状态方案数的EGF,显然F(x)=π(ep[i]x/p+(-1)s[i]e-p[i]x/p)/2,然而方案包含一些多次到达合法方案的状态,需 ...

  3. iOS 类似外卖 两个tableView联动

    在伯乐在线上看到一个挺好玩的文章,自己也参考文章实现了一下. 效果实现如图所示: 具体实现的内容可以参考原文,参考文章:<iOS 类似美团外卖 app 两个 tableView 联动效果实现&g ...

  4. 20)PHP,数组的遍历

    然后开始使用这2个函数和while循环结构来实现数组遍历: 形式: reset($arr1); while ( list ($key, $value ) = each( $arr1) ) //从数组$ ...

  5. Spring的@Transactional(readOnly=true)注解,对其效果进行测试

    https://blog.csdn.net/xcdsdf14545/article/details/86164012

  6. Nesterov方法的python实现

    牛顿动量法,相比于上一篇Momentum,不一样的地方是应用了临时更新 这里用python对其进行简单实现,如下: # coding=utf-8 """ 基于小批量梯度下 ...

  7. Number of Digit One(Medium)

    1.算法说明: 如3141592,在m(digitDivide)=100时,即要求计算百位上"1"的个数 其中a为31415,b为92,31415中出现了3142次"1& ...

  8. QQ消息群发助手(超级简单)

    大家好!我开发的小工具,效果见动图: 下载地址 QQ群发助手.rar 代码: def Login(): global Flag try: bot.Login(['-q',v1.get()]) tkin ...

  9. mongo rename collection

    db.getCollection('a').renameCollection("b"); db.getCollection('a').find({}, {_id: 0}).forE ...

  10. LeetCode No.79,80,81

    No.79 Exist 单词搜索 题目 给定一个二维网格和一个单词,找出该单词是否存在于网格中. 单词必须按照字母顺序,通过相邻的单元格内的字母构成,其中"相邻"单元格是那些水平相 ...