该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等。如有错误,还请批评指教。在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字。因本人一直在学习英语,所以该系列以英文为主,同时也建议读者以英文为主,中文辅助,以便后期进阶时,为学习相关领域的学术论文做铺垫。- ZJ

Coursera 课程 |deeplearning.ai |网易云课堂


转载请注明作者和出处:ZJ 微信公众号-「SelfImprovementLab」

知乎:https://zhuanlan.zhihu.com/c_147249273

CSDN:http://blog.csdn.net/JUNJUN_ZHAO/article/details/78895412


More derivatives examples(更多导数的例子)

(字幕来源:网易云课堂)

In this video and show you a slightly more complex example,where the slope of the function can be different at different points in the function.let’s start with an example,here I plot to a function f of a equals a squared.let’s take a look at the point in equals two,so a squared or F of a is equal to four.let’s nudge a slightly to the right ,so,now a is equal to two point zero zero one,f of a which is a squared is going to be approximately four point zero zero four,it turns out that the exact value,if you call the calculator and figure this out is actually four point zero zero four zero zero one,now I’m just to say a 4.04 is close enough.

在这个视频中,我将给出一个更加复杂的例子。在这个例子中,函数在不同点处的斜率是不一样的。先来举个例子,我在这里画一个函数 f(a)f(a)等于aa的平方,来看看 aa 等于 2 的点,在这个点上 aa 的平方等于 4,让我们稍稍往右推进一点点,现在 aa 等于 2.001,而 f(a)f(a) 即 aa 的平方,约为 4.004,但是 如果你用计算器算的话,这个准确的值应该为,4.004001,为了简便起见 省略了后面的部分。

so what this means is that when a is equal to two.let’s draw this on the plot,so what we’re saying is that,if a is equal to 2 then F of a is equal to 4,and here at the x and y axes are not drawn to scale,technically this vertical height,should be much higher than this horizontal height.so the x and y axes are not on the same scale,but if I now nudge a to 2.001 then F of a becomes roughly 4.004. so if you draw this little triangle again what this means is that if I nudge a to the right by 0.001,f of a goes up four times as much by 0.004.so in the language of calculus we say that the slope that is the derivative from F of a at a equals 2 is 4

这里想表达的是当a=2a=2时,我们重新在图上画一下,如果a=2a=2的话,那么f(a)=4f(a)=4,这里 x 轴和 y 轴的比例还是不太准确,实际上这个点的高度,要比这里纵轴的 x 值,还要大那么一点点 x 轴和 y 轴不成比例的,如果让a=2.001a=2.001,则f(a)f(a)约为 4.004 如果你在这儿画,一个小三角形,你就会发现,如果把aa往右移动 0.001,那么f(a)f(a)将增大四倍 即增大 0.004,在微积分中我们把这个,此三角形斜边的斜率,f(a)f(a)在点a=2a=2处的导数等于 4。

or to write this out with calculus notation,we say that d/da of f of a is equal to 4,when a is equal to 2 now one thing about,this function f of a equals a square is that the slope is different for different values of a,this is different and the example we saw on the previous slide.so let’s look at a different point,if a is equal to 5 so except equals 2,now you have a equals 5 then a squared is equal to 25,so that’s f of a if I nudge a to the right again.it’s tiny little nudge of a so now a is 5.001,then F of a will be approximately 25.010.so what we see is that by nudging a up by 0.001,F of a goes up 10 times as much.so we have that d da f of a is equal to 10 when a is equal to 5,because F of a goes up 10 times as much as a does,when I make a tiny little nudge to a so one way to see.

或者写成微积分的形式,当a=2a=2的时候,ddaf(a)=4\dfrac{d}{da}f(a)=4 由此可知,函数f(a)=a2f(a)=a^2,aa取不同值的时候,它的斜率是不同的 这和上个视频中的例子不一样,现在换个点来看,如果a=5a=5 不再等于 2,a=5a=5 ,aa 的平方为 25,这是f(a)f(a)的值,如果再一次把aa往右移一点点,只是移动非常小的一段距离 让a=5.001a=5.001,而f(a)f(a)的值大约为 25.010,当我们只往右移动了 0.001 时,f(a)f(a)却增大了10倍,即可以写作 ddaf(a)=10\dfrac{d}{da}f(a)=10,此时aa的值为 5 这里只是小小地移动了aa,f(a)f(a)的值增大了 10 倍 有种直观的方法可以解释。

why the derivative is different at different points, is that if you draw that here a little triangle right at different locations on this,you see that the ratio of the height of the triangle,over the width of the triangle is very different,at different points on the curve.so here the slope is equal to 4,when a is equal to 2 but is equal to 10,when a is equal to 5 now if you pull up,a calculus textbook a calculus textbook will tell you that d/da of f of a so f of a is equal to a square.so that d/da of a squared,one of the formulas you find that the calculus textbook is that,this thing the slope of the function a squared is equal to 2a.

为什么一个点的斜率,在不同位置会不同?如果你在曲线上的,不同位置画一些小小的三角形,你就会发现 三角形高和宽的比值,在曲线上不同的地方,它们是不同的,所以当a=2a=2时,这里的斜率为 4 而当a=5a=5时,这里的斜率为 10 如果你翻看,微积分的课本,课本会告诉你,ddaf(a)\dfrac{d}{da}f(a) 这里f(a)f(a)等于aa的平方,ddaf(a)\dfrac{d}{da}f(a)的值,由课本上的公式可知,函数f(a)=a2f(a)=a^2的斜率 应该等于2a2a。

I’m not going to prove this,but the way you find yours out is that,you open up a calculus textbooks to the table formulas,and it’ll tell you the derivative of two of a squared,is equal to 2a and indeed,this is consistent with what we’ve worked out mainly,when a is equal to 2,the slopes of function to a is 2 times 2,is therefore equal to 4,and when a is equal to 5,then the slope of the function 2 times a is 2 times 5,is equal to 10,so if you ever pull up a calculus textbook,and you see this formula that,the derivative of a squared is equal to 2a,

这里不证明这个公式,但你可以打开微积分课本,找到上面的公式表,它会告诉你f(a)=a2f(a)=a^2的导数,确实为2a2a,事实上这也和我们 手工算的结果一样,当a=2a=2时,函数的斜率为 2 乘以 2,即等于 4,当a=5a=5时 函数的斜率为,2 乘以 aa 即 2 乘以 5 等于 10,如果你翻看微积分课本,你会看到这个公式,即a的平方的导数 等于2a2a,

all that means is that for any given value of a,if you nudge it up with by 0.001,already your tiny little value.you would expect f of a to go up by 2a,that is the slope or the derivative times,however much you had an urge to the right,the value of a now one tiny little detail.you know I have used these approximate symbols here,and this wasn’t exactly 4.04,there’s an extra point 001.you know there it turns out that,this extra pont 001 this little thing here is,because we were nudging a to the right,by 0.001 if we’re instead nudging it to the right,by this new infinitesimally /infini’tesiməli/ 极小地 small value,then this extra ever term,will go away and you find that the amount,that f of a goes up is exactly equal to,the derivative times the amount that you nudged to the right,

这意味着任意给定一点aa,如果你稍微将aa,增大 0.001,那么你会看到 f(a)f(a)将增大2a2a,即增大的值为点在aa处斜率或导数,乘以你向右移动的距离,现在 有个小细节需要注意,之前我在这里使用了一些不精确的值,这里的值不应该为 4.04,你知道这里,应该还有额外 001 这里有额外的 001 是因为,我们把aa向右移动了 0.001,然而如果我们把 aa 向右移动,像这样一个非常非常小的值,那么这个额外的项,将可以被忽略 这样的话,你会发现f(a)f(a)增大的值,刚好等于导数乘以 你向右边移动的距离,

and the reason why is not 4.004 exactly is,because derivatives are defined using,this infinitesimally small not just to a rather than you know 0.001,which is well and while 0.001 is small is not infinitesimally small,so that’s why the amount that effort,where it went up isn’t exactly given by the formula,but is only kind of approximately,given by the derivative to wrap up this video,let’s just go through a few more quick examples,the example you’ve already seen is that,if f of a equals a squared then,in calculus textbooks formula table,will tell you that the derivative is equal to 2a.

至于为什么不是刚好等于 4.004,是因为导数就是根据,这个无穷小值来定义的。而这里的 0.001虽然比较小,但是它还不足以小到,可以被忽略。这就是为什么导数增大的值 不是恰好等于公式算出来的,而只是根据导数算出来的一个近似值,出于总结本课的目的,我们再来看看几个例子,之前你已经知道的是,f(a)f(a )等于 aa 的平方,按照微积分课本上的写法,这个函数的导数应该为 2a2a。

and so the example we went through was that if a is equal to 2 f of a,equals 4 and if we nudge a,so it’s a little bit bigger then f of a is about 4.004,and so f of a went up four times as much,and indeed when a is equal to 2 the derivative,is equal to 4 let’s look at some other examples.let’s say instead f of a is equal to a cubed.if you go to a calculus textbook,and look up the table of formulas.you see that the slope of the function again,the derivative of this function is equal to 3a squared.so you can get this formula out of a calculus textbook.

和之前的例子一样,如果aa等于 2 那么f(a)f(a)等于 4,把aa向右边移动一点,那么f(a)f(a)将增大一点 大约为 4.004,所以f(a)f(a)增大了向右移动距离的四倍,事实上 当a=2a=2时,导数的值为 4 来看看其他例子,假设f(a)f(a)等于aa的三次方,如果你,翻看微积分课本上的导数公式表,你会发现这个函数的斜率,即这个函数的导数,等于 3 乘以 a 的平方 3a23a^2,你可以在微积分课本上 查到这个公式。

so what this means?so the way to interpret this is as follows.let’s take a equals 2 as an example again,so f of a or a cubed /kjuːb/ 三次方 is equal to 8 does 2 to power 3, so if we give a tiny little nudge,you find that f of a is about eight point zero one two and feel free to check this,take two point zero zero one two three you find that is very close to eight point zero one two and indeed when a is equal to 2,that’s 3. times 2 squared that’s equal to 3 times 4 is equal to 12 so the derivative formula predicts that,if you now nudge a to the right by a tiny little bit f of a should go up 12 times as much,and indeed this is true when a went up by point 001,f of a went up 12 times as much by point 012,

什么意思呢?,同样地举一个例子,我们再次令a=2a=2,aa 的三次方等于 8,即 2 的三次方,如果我们又将 aa增大一点点,你会发现f(a)f(a)的值,大约为 8.012 你可以自己检查一遍,如果我们取 8.012 你会发现 2.001 的三次方,和 8.012 很接近,事实上,当a=2a=2时,导数值为 3 乘以 2 的平方,即 3乘以 4 等于 12,导数公式表明,如果你将 aa 向右移动 很小的一段距离,那么f(a)f(a)将会增大向右移动距离的 12 倍,所以当aa增加 0.001时,f(a)f(a)增大了四倍 即 0.012,

just one last example,and then we’ll wrap up let’s say the f of a is equal to the log function right.so I’m going to write log of a,and I’m going to use a umm base e logarithm.so some people write that as ln of a.so if you go to calculus textbooks you find that,when you take the derivative of log of a,and so this is a function that just looks like that,the slope of this function is given by 1 over a,so the way to interpret this is that if a is any value again let’s just keep using equals 2 as an example
,and you nudge a to the right by 0.001.you would expect f of a,to go up by 1 over a,that is by the derivative times the amounts that

最后一个例子,假设f(a)f(a)是一个loglog函数,即f(a)=log(a)f(a)=log(a),写作log(a)log(a) 然后我将使用,一个以ee为底数的对数函数 有些人,可能会写作ln(a)ln(a),所以如果你去看微积分课本,那么log(a)log(a)的导数,注意函数log(a)log(a)的图像 是这样的,函数log(a)log(a)的斜率 应该为aa分之1 1a\dfrac{1}{a},所以我们可以解释如下,如果aa取任何值,比如再一次取a=2a=2,然后又把aa 向右边移动 0.001,那么f(a)f(a)将增大aa分之 1,即函数f(a)f(a)的导数,乘以你增大aa的值 (0.001)

you increase a so in fact um,if you pull up a calculator you find that as a is equal to 2,f of a is about 0.6931,and if you increase f and if you increase a to 2 point 0015,and if you increase f and if you increase a to 2 point 001,then f of a is about 0.69365,so it’s gone up by 0.0005,indeed if you look at the formula for the derivative

事实上借助计算器的话,你会发现当a=2a=2时,f(a)f(a)约为 0.69315,如果你增加ff 如果你将aa增大到 2.001,那么f(a)f(a)约为 0.69365,所以f(a)f(a)增大了 0.0005,事实上如果你查看导数公式

when a is equal to 2 d/da f of a,is equal to 1/2 so this derivative formula,predicts that if you pump up a by 0.001,you will expect f of a to go up,by only one half as much and one half 0.0001 is 0.0005which is exactly what we got right then when a goes up by 0.001going from a close to two equals two point 001,f of a goes up by half as much as this,are going up by approximately 0.0005,so if you draw that little triangle if you will is that,if on the horizontal axis goes up by 0.001,under vertical axis log of a goes up by half of that,so point 0005 and so that one over a 1/2 in this case,when a is equal to 2,that’s just the slope of this line when a is equal to 2.

当 a=2a=2 的时候 导数值 ddaf(a)\dfrac{d}{da} f(a),等于二分之一,导数公式表明 如果把aa增大 0.001,f(a)f(a)将只会增大,0.001 的二分之一 即 0.0005,这正是我们所得到的值 当aa增大 0.001 时,从aa等于 2 增大到非常近的 2.001,f(a)f(a)增大了这个的二分之一,增大了大约 0.0005,所以如果你在这儿画个小三角形,你就会发现,如果 x 轴增加了 0.001,那么 y 轴上的函数log(a)log(a) 将增大 0.001 的一半,即 0.0005 所以是aa分之 1,当 a=2a=2 时 是 1/2,这个1/2 就是 当a=2a=2时 这条线的斜率,这些就是导数的知识了。

there’s just two take-home messages from this video,first is that, the derivative of the function just means,the slope of a function and the slope of a function,can be different at different points on the function,in our first example where f of a equals 3a,this is a straight line the derivative was the same everywhere,it was 3 everywhere,but for other functions like f of a equals a squared,or f(a) equals log of a,the slope of the line varys,so the slope or the derivative can be different at different points on the curve,so does the first take away derivative just means slope of a line,

在这个视频中,你只需要记住两点,第一点是 函数的导数,就是函数的斜率,而函数的斜率在不同的点是不同的, 在第一个例子中 f(a)=3af(a)=3a,这是一条直线 在任何点 它的斜率都是相同的,都是 3,但是对于函数f(a)=a2f(a)=a^2,或者f(a)=log(a)f(a)=log(a),它们的斜率是变化的,它们的导数或者斜率 在曲线上不同的点处,是不同的,这是第一个你需要记住的 即导数就是斜率,

second takeaway is that,if you want to look up the derivative of a function,you can flip open 翻开 your calculus textbook or look at Wikipedia,and often get a formula,for the slope of these functions at different points,so that I hope you have an intuitive understanding of derivatives or slopes of lines,let’s go into the next video,we’ll start to talk about the computation graph,and how to use that to compute derivatives of more complex functions

第二点是,如果你想知道 一个函数的导数,你可参考微积分课本或者维基百科,然后你应该就能,找到这些函数的导数公式,最后我希望 你对导数和斜率,有了一个直观的理解,接下来看下一个视频,下一课 我们将讲解流程图,以及如何用它来求更加复杂的函数的导数


PS: 欢迎扫码关注公众号:「SelfImprovementLab」!专注「深度学习」,「机器学习」,「人工智能」。以及 「早起」,「阅读」,「运动」,「英语 」「其他」不定期建群 打卡互助活动。

Coursera | Andrew Ng (01-week-2-2.6)—更多导数的例子相关推荐

  1. 【原】Coursera—Andrew Ng机器学习—Week 9 习题—异常检测

    [原]Coursera-Andrew Ng机器学习-Week 9 习题-异常检测 参考文章: (1)[原]Coursera-Andrew Ng机器学习-Week 9 习题-异常检测 (2)https: ...

  2. Coursera | Andrew Ng (01-week-3-3.8)—激活函数的导数

    该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一直在学习英语,所以 ...

  3. Coursera | Andrew Ng (02-week-1-1.12)—梯度的数值逼近

    该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一直在学习英语,所以 ...

  4. Coursera | Andrew Ng (01-week-2-2.5)—导数

    该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一直在学习英语,所以 ...

  5. Coursera | Andrew Ng (02-week-1-1.7)—理解 Dropout

    该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一直在学习英语,所以 ...

  6. Coursera | Andrew Ng (01-week-2-2.17)—Jupyter _ ipython 笔记本的快速指南

    该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一直在学习英语,所以 ...

  7. Coursera | Andrew Ng (01-week-1-1.2)—什么是神经网络?

    什么是神经网络? 该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一 ...

  8. Coursera | Andrew Ng (01-week-1-1.2)—What is a Neural Network?

    什么是神经网络? 该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一 ...

  9. Coursera | Andrew Ng (01-week-1-1.3)—用神经网络进行监督学习

    该系列仅在原课程基础上部分知识点添加个人学习笔记,或相关推导补充等.如有错误,还请批评指教.在学习了 Andrew Ng 课程的基础上,为了更方便的查阅复习,将其整理成文字.因本人一直在学习英语,所以 ...

最新文章

  1. 图文解说nginx中server的匹配顺序
  2. 隔空投送所有人安全吗_Find X2将采用2K+120Hz屏幕,支持65W;安卓将拥有“隔空投送”;“杀毒霸主”Avast被曝偷卖4.35亿用户数据;...
  3. python 解压js压缩的图片_Python解压各种压缩文件总结
  4. Maven(一)Maven及插件安装
  5. 数据结构和算法(01)--- 算法复杂度
  6. [Angularjs] 第一步开始一个项目
  7. 记我朋友的一次前端面试
  8. codeblock的多个文件编译怎么_给一个iOS app配置多个环境变量
  9. ExtJS2.0实用简明教程——可编辑表格EditorGridPanel
  10. AspnetPager
  11. Landsat系列卫星
  12. 创建第一个air程序转自 IT168 静水流深
  13. 新手前端程序员就职指南之 - 入职第一天
  14. 快速搜索Wox工具之Everything Client没有运行报错,解决办法!
  15. ftp打开方式更改为资源管理器方法
  16. linux 局域网 提高网速,提高Linux系统网速的方法
  17. 安卓手机如何把PDF文件转换为JPG图片
  18. 汇编语言(王爽第三版)实验一
  19. 省钱!程序员福利!!全国多地一分钱乘公交优惠活动来了!持续到5月底
  20. 数据结构与算法分析C++语言描述(第四版)图论学习记录

热门文章

  1. MySQL5.7官方下载链接导航
  2. 一.关于实现浏览器弹窗提示内容几秒后自动消失重定向执行其他函数的两种方法
  3. echarts之饼图制作+标示线
  4. 用python绘制熊猫图案_在python中绘制大熊猫系列的CDF
  5. 【LeetCode】《剑指Offer》第Ⅰ篇⊰⊰⊰ 3 - 11题
  6. 在fastreport里转换金额大小写
  7. Mezzanine多site管理问题
  8. 【C++】(一)C++入门第一课
  9. word生成目录右对齐
  10. linux nodejs 采集器,前端工程师通过nodejs链接linux,并上传代码进行半自动化更新,省去ssh+ftp的链接工具-前端黑科技-SegmentFault思否...