{"id":1042,"date":"2018-07-29T23:26:47","date_gmt":"2018-07-29T15:26:47","guid":{"rendered":"http:\/\/www.whudj.cn\/?p=1042"},"modified":"2018-08-02T13:58:53","modified_gmt":"2018-08-02T05:58:53","slug":"%e6%a2%af%e5%ba%a6%e4%b8%8b%e9%99%8d%e6%b3%95gradient-descent%e4%b8%8e%e7%89%9b%e9%a1%bf%e6%b3%95newtons-method%e6%b1%82%e8%a7%a3%e6%9c%80%e5%b0%8f%e5%80%bc","status":"publish","type":"post","link":"http:\/\/www.whudj.cn\/?p=1042","title":{"rendered":"\u68af\u5ea6\u4e0b\u964d\u6cd5(gradient descent)\u4e0e\u725b\u987f\u6cd5(newton&#8217;s method)\u6c42\u89e3\u6700\u5c0f\u503c"},"content":{"rendered":"<p>\u68af\u5ea6\u4e0b\u964d\u6cd5\u4e0e\u725b\u987f\u6cd5\u662f\u6c42\u89e3\u6700\u5c0f\u503c\/\u4f18\u5316\u95ee\u9898\u7684\u4e24\u79cd\u7ecf\u5178\u7b97\u6cd5\u3002\u672c\u6587\u7684\u76ee\u6807\u662f\u4ecb\u7ecd\u4e24\u79cd\u7b97\u6cd5\u7684\u63a8\u5bfc\u601d\u8def\u4e0e\u6d41\u7a0b\uff0c\u5e76\u4e14\u4ece\u521d\u5b66\u8005\u7684\u89d2\u5ea6\u5c31\u4e00\u4e9b\u5bb9\u6613\u6df7\u6dc6\u7684\u8bdd\u9898\u5982 \u68af\u5ea6\u4e0b\u964d\u6cd5(gradient descent)\u4e0e\u6700\u901f\u4e0b\u964d\u6cd5(steepest descent)\u7684\u8054\u7cfb\u4e0e\u533a\u522b\u3001\u725b\u987f\u6c42\u6839\u8fed\u4ee3\u65b9\u6cd5(Newton\u2013Raphson method) \u4e0e\u725b\u987f\u6cd5\u6c42\u89e3\u6700\u5c0f\u503c\u7b97\u6cd5\u7684\u8054\u7cfb(\u6765\u81ea Andrew Ng \u673a\u5668\u5b66\u4e60\u8bfe\u7a0b\u7b2c\u56db\u8bb2)\u8fdb\u884c\u8bf4\u660e\u3002\u672c\u6587\u7684\u5185\u5bb9\u5c06\u5bf9\u9ad8\u65af\u725b\u987f\u6cd5(Gauss\u2013Newton algorithm) ,Levenberg-Marquardt\u7b97\u6cd5(LM\u7b97\u6cd5)\u7b49\u975e\u7ebf\u6027\u6700\u5c0f\u4e8c\u4e58\u95ee\u9898\u89e3\u6cd5\u8d77\u5230\u5f15\u51fa\u4f5c\u7528\u3002<\/p>\n<p><!--more--><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>1.\u68af\u5ea6\u4e0b\u964d\u6cd5<\/strong><\/span><\/p>\n<p>\u5df2\u77e5\u591a\u5143\u51fd\u6570 \\(f(x_1,x_2,\\dots,x_n)\\) \u5728\u5b9a\u4e49\u57df\u4e0a\u53ef\u5fae\uff0c\u5982\u679c\u5c06\\(f(\\mathbf{x})\\)\u5728\\(\\mathbf{x}\\)\u5904\u4e00\u9636\u6cf0\u52d2\u5c55\u5f00(tayler expansion),\u53ef\u5f97\u5230\uff1a(\u8bf4\u660e\uff1a\u4e3a\u4e86\u7f16\u8f91\u65b9\u4fbf\u4e0b\u6587\u4e2d\u7edf\u4e00\u4ee5 \\(x={\\begin{bmatrix}<br \/>\nx_1,x_2,\\dots,x_n<br \/>\n\\end{bmatrix}}^T\\) \u4ee3\u66ff \\(\\mathbf{x}\\)\u00a0 )\u3002$$f(x+\\epsilon) = f(x)+\\epsilon ^T\\nabla_x f + O(||\\epsilon||)\\approx\u00a0 f(x)+\\epsilon ^T\\nabla_x f $$\u5176\u4e2d\\(\\nabla_x f\u00a0 ={\\begin{bmatrix}<br \/>\n\\frac{\\partial f}{\\partial x_1},\\dots,\\frac{\\partial f}{\\partial x_n}<br \/>\n\\end{bmatrix}}^T \\)\u4e3a \\(f\\)\u5728\\(x\\)\u5904\u7684\u68af\u5ea6\u5411\u91cf\u3002<\/p>\n<p>\u8fd9\u4e2a\u5f0f\u5b50\u6211\u4eec\u53ef\u4ee5\u89e3\u8bfb\u4e3a\u5f53 \\(x\\)\u589e\u52a0 \\(\\epsilon\\)\u65f6\uff0c\\(f(x)\\)\u589e\u52a0\\(\\epsilon ^T\\nabla_x f\\)\uff0c\u5373\\(\\epsilon\\)\u4e0e\u68af\u5ea6\\(\\nabla_x f\\)\u7684\u5167\u79ef\u3002\u5982\u679c\u6211\u4eec\u9650\u5b9a\\(\\epsilon\\)\u7684\u6a21\u957f\u4e3a\u5b9a\u503c\uff0c\u5176\u65b9\u5411\u600e\u6837\u624d\u80fd\u83b7\u5f97\\(f(x+\\epsilon) \\)\u7684\u6700\u5c0f\u503c\u5462\uff1f\u7b54\u6848\u5f53\u7136\u662f\u4e0e\\(\\nabla_x f\\)\u65b9\u5411\u76f8\u53cd\u7684\u65f6\u5019\uff0c\u6b64\u65f6\\(\\epsilon ^T\\nabla_x f\\)\u83b7\u5f97\u6700\u5c0f\u503c\u3002<\/p>\n<p>\u6211\u4eec\u4e5f\u53ef\u4ee5\u5229\u7528\u76f4\u89c9\u4e0a\u8f83\u597d\u7406\u89e3\u7684\u722c\u5c71\u7684\u4f8b\u5b50\u6765\u89e3\u91ca\u68af\u5ea6\u4e0b\u964d\u6cd5\u3002\u5047\u8bbe\u4f60\u4f4d\u4e8e\u5c71\u4e0a\u67d0\u4e00\u70b9\u5750\u6807\u4e3a\\(\\mathbf{\\theta}(\\theta _1,\\theta _2)\\)\uff0c\u90a3\u4e48\u5728\u6b64\u5904(\u6ce8\u610f\uff0c\u662f\u5728\u8fd9\u4e00\u70b9)\u4e0b\u5c71\u6700\u5feb\u7684\u65b9\u5411\u5f53\u7136\u662f\u6cbf\u7740\u6b64\u5904\u7684\u68af\u5ea6\u65b9\u5411\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1071\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2018\/07\/steepest_descent_1.png\" alt=\"\" width=\"326\" height=\"171\" \/><\/p>\n<p>\u6240\u4ee5\u8bf4\uff0c\u5c06\u6574\u4e2a\u6545\u4e8b\u4e32\u8d77\u6765\uff0c\u68af\u5ea6\u4e0b\u964d\u6cd5\u7684\u601d\u8def\u53ef\u4ee5\u603b\u7ed3\u5982\u4e0b\uff1a\u6b32\u6c42\u591a\u5143\u51fd\u6570\\(f(x)\\) \u7684\u6700\u5c0f\u503c\uff0c\u53ef\u4ee5\u91c7\u7528\u5982\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<ol>\n<li>\u7ed9\u5b9a\u521d\u59cb\u503c\\(x_0\\)\u3002<\/li>\n<li>\u6309\u7167\u5982\u4e0b\u65b9\u5f0f\u201c\u4e0b\u5c71\u201d\uff1a\\(x_{i+1} = x_i-\\eta\\nabla_{x_i}\u00a0 \u00a0f\\) \u3002\u5176\u4e2d\\(\\eta&gt;0\\)\uff0c\u5728\u673a\u5668\u5b66\u4e60\u9886\u57df\uff0c\\(\\eta\\)\u4e5f\u88ab\u79f0\u4e4b\u4e3a\u5b66\u4e60\u7387(learning rate)\u3002<\/li>\n<li>\u76f4\u5230\\(x\\) \u6ee1\u8db3\u6536\u655b\u6761\u4ef6\u4e3a\u6b62\u3002\u5982\\(\\|f(x_{i+1}) &#8211; f(x_i)\\|&lt;\\epsilon\\)\u6216\\(||\\nabla_{x_i}f||\\approx 0\\)\u3002<\/li>\n<\/ol>\n<p>\u5b66\u4e60\u7387\u7684\u91cd\u8981\u6027\uff1a<\/p>\n<p>\u5b66\u4e60\u7387\u4f5c\u4e3a\u63a7\u5236\u4e0b\u964d\u6b65\u957f\u7684\u53c2\u6570\uff0c\u5f71\u54cd\u51fd\u6570\u4e0b\u964d\u7684\u901f\u5ea6\u3002\u5b66\u4e60\u7387\u662f\u6211\u4eec\u6839\u636e\u7ecf\u9a8c\u786e\u5b9a\u7684\u4e00\u4e2a\u53c2\u6570\uff0c\u56e0\u6b64\u5728\u673a\u5668\u5b66\u4e60\u9886\u57df\u4e2d\u8fd9\u6837\u7684\u53c2\u6570\u4e5f\u88ab\u6210\u4e3a\u8d85\u53c2\u6570(hyperparameter)\u3002\u5b66\u4e60\u7387\u7684\u9009\u53d6\u4e0d\u80fd\u8fc7\u5927\u6216\u8005\u8fc7\u5c0f\uff0c\u5982\u4e0b\u56fe\uff0c\u4e0d\u540c\u7684\u5b66\u4e60\u7387\u5bfc\u81f4\u51fd\u6570\u4e0d\u540c\u7684\u6536\u655b\u901f\u5ea6\uff0c\u751a\u81f3\u53ef\u80fd\u5bfc\u81f4\u51fd\u6570\u4e0d\u6536\u655b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1118\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2018\/07\/different_learning_rate-1.png\" alt=\"\" width=\"250\" height=\"201\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">1.1 \u68af\u5ea6\u4e0b\u964d\u6cd5\u7684\u4f18\u52bf<\/span><\/strong><\/p>\n<p>1.\u65f6\u95f4\u590d\u6742\u5ea6\u4f4e\uff0c\u5728\u6bcf\u4e00\u4e2a\u8fed\u4ee3\u4e2d\uff0c\u53ea\u9700\u8981\u8ba1\u7b97\u68af\u5ea6\uff0c\u4e0d\u9700\u8981\u5bf9\u4e8c\u9636\u5bfc\u6570\u77e9\u9635\uff08\u5373\u6d77\u68ee\u77e9\u9635(Hessian Matrix)\uff09\u8fdb\u884c\u8ba1\u7b97\u3002<\/p>\n<p>2.\u7a7a\u95f4\u590d\u6742\u5ea6\u4f4e\uff0c\u56e0\u4e3a\u68af\u5ea6\u5411\u91cf\u4e3a\u4e00\u4e2a\\(n\\times 1\\)\u7684\u5411\u91cf\uff0c\u6bd4\u8d77Hessian Matrix\u6765\uff0c\u5360\u7528\u5b58\u50a8\u7a7a\u95f4\u5c0fn\u500d\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\\(\\mathbf{x}\\)\u7684\u7ef4\u5ea6\u53ef\u80fd\u975e\u5e38\u9ad8\u3002<\/p>\n<p><strong><span style=\"text-decoration: underline;\">1.2\u68af\u5ea6\u4e0b\u964d\u6cd5\u7684\u5c40\u9650<\/span><\/strong><\/p>\n<p>\u5bf9\u4e8e\u90e8\u5206\u6c42\u89e3\u51fd\u6570\uff0c\u68af\u5ea6\u4e0b\u964d\u6cd5\u53ef\u80fd\u4f1a\u51fa\u73b0\u4e0b\u964d\u975e\u5e38\u7f13\u6162\u7684\u60c5\u5f62\u3002\u5176\u6536\u655b\u901f\u5ea6\u4e5f\u8f83\u5176\u4ed6\u65b9\u6cd5\u4f4e\uff08\u5176\u4ed6\u6587\u732e\u5206\u6790\u5176\u6536\u655b\u901f\u5ea6\u4e3a\u7ebf\u6027\uff0c\u672c\u6587\u4e0d\u4f5c\u63a8\u5bfc\uff09\u3002\u5982\u4e0b\u56fe\uff0c\u68af\u5ea6\u4e0b\u964d\u6cd5\u7684\u8def\u5f84\u51fa\u73b0\u4e86z\u5b57\u578b\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1082\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2018\/07\/600px-Banana-SteepDesc.gif\" alt=\"\" width=\"300\" height=\"240\" \/><\/p>\n<p>\u7a76\u5176\u539f\u56e0\uff0c\u6211\u8ba4\u4e3a\uff0c\u67d0\u4e00\u70b9\u7684\u68af\u5ea6\u53ea\u80fd\u4f5c\u4e3a\u8fd9\u4e00\u70b9\u7684\u4e00\u4e2a\u6781\u5c0f\u7684\u9886\u57df\u5904\u7684\u6700\u5feb\u4e0b\u964d\u65b9\u5411\uff0c\u4e00\u65e6\u68af\u5ea6\u53d8\u5316\u8f83\u5feb\uff0c\u68af\u5ea6\u4e0b\u964d\u6cd5\u4f1a\u51fa\u73b0\u56e0\u4e3a\u5b66\u4e60\u7387\u4e0d\u5408\u9002\u800c\u51fa\u73b0&#8221;zigzag&#8221;\u73b0\u8c61\u3002\u800c\u4e14\uff0c\u5982\u679c\u6211\u4eec\u5c06\u68af\u5ea6\u4e0b\u964d\u6cd5\u4e0e\u4e0b\u6587\u7684\u725b\u987f\u6cd5\u505a\u5bf9\u6bd4\uff0c\u4f60\u4f1a\u53d1\u73b0\uff0c\u4e00\u76f4\u6cbf\u7740\u68af\u5ea6\u65b9\u5411\u4e0b\u964d\u7684\u901f\u5ea6\u4e0d\u4e00\u5b9a\u662f\u6700\u5feb\u7684\u3002\u5982\u4e0b\u56fe\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1117\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2018\/07\/330px-Newton_optimization_vs_grad_descent.svg_-1.png\" alt=\"\" width=\"200\" height=\"229\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong><span style=\"text-decoration: underline;\">1.3 \u6700\u901f\u4e0b\u964d\u6cd5(steepest decent) \u4e0e\u00a0 \u68af\u5ea6\u4e0b\u964d\u6cd5(gradient descent)\u7684\u8054\u7cfb<\/span><\/strong><\/p>\n<p>\u603b\u7ed3\u4e00\u4e0b\u5c31\u662f \u68af\u5ea6\u4e0b\u964d\u6cd5\u662f\u6700\u901f\u4e0b\u964d\u6cd5\u7684\u4e00\u79cd\u7279\u4f8b\u3002\u5728\u6700\u901f\u4e0b\u964d\u6cd5\u4e2d\uff0c\u5bf9\u4e8e\u67d0\u4e00\u8303\u6570\u4e0b\\(epsilon\\)\u7684\u53d6\u503c\u6839\u636e\u4ee5\u4e0b\u539f\u5219\uff1a<\/p>\n<p>\\(\\bigtriangleup \\epsilon_{nsd}=argmin_v(\\nabla f(x)^T\\epsilon\\mid \\|\\epsilon\\|=1)\\)<\/p>\n<p>\u5f53\u6211\u4eec\u6307\u5b9a\u7684\u8303\u6570\u4e3a\u6b27\u51e0\u91cc\u5f97\u8303\u6570\u65f6\uff0c\u6700\u901f\u4e0b\u964d\u6cd5\u7ed9\u51fa\u7684\u4e0b\u964d\u65b9\u5411\u5c31\u662f\u68af\u5ea6\u7684\u8d1f\u65b9\u5411\uff0c\u5373\u68af\u5ea6\u4e0b\u964d\u6cd5\u7ed9\u51fa\u7684\u65b9\u5411\u3002<\/p>\n<p>\u5728wikipedia\u4e2d\u8bf4\u660e\uff0c\u68af\u5ea6\u4e0b\u964d\u6cd5\u4e5f\u88ab\u79f0\u4e3a\u6700\u901f\u4e0b\u964d\u6cd5(Gradient descent is also known as steepest descent )\u3002<\/p>\n<p><strong><span style=\"text-decoration: underline;\">2.\u725b\u987f\u6cd5<\/span><\/strong><\/p>\n<p>\u5982\u540c\u6839\u636e\u4e00\u9636\u6cf0\u52d2\u5c55\u5f00\u63a8\u5bfc\u51fa\u68af\u5ea6\u4e0b\u964d\u6cd5\u4e00\u6837\uff0c\u6839\u636e\u4e8c\u9636\u6cf0\u52d2\u5c55\u5f00\u53ef\u4ee5\u63a8\u5bfc\u51fa\u725b\u987f\u4f18\u5316\u6cd5(newton&#8217;s method in optimization)\u3002\u5c06\\(f(\\mathbf{x})\\)\u5728\\(\\mathbf{x}\\)\u5904\u4e00\u9636\u6cf0\u52d2\u5c55\u5f00(tayler expansion),\u53ef\u5f97\u5230\uff1a$$f(x+\\epsilon) = f(x)+\\epsilon ^T\\nabla_x f + \\frac{1}{2}\\epsilon ^TH\\epsilon +O(||\\epsilon||^2)\\approx\u00a0 f(x)+\\epsilon ^T\\nabla_x f +\u00a0\\frac{1}{2}\\epsilon ^TH\\epsilon $$<\/p>\n<p>\u5982\u679c\u6211\u4eec\u5c06\\(x\\)\u770b\u505a\u56fa\u5b9a\u7684\u5df2\u77e5\u91cf\uff0c\u5c06\\(f\\)\u770b\u505a\u5173\u4e8e\\(\\epsilon\\)\u7684\u51fd\u6570\uff0c\u90a3\u4e48\u6b32\u6c42\\(f(\\epsilon | x)\\)\u7684\u6700\u5c0f\u503c\uff0c\u5fc5\u8981\u6761\u4ef6(\u6ce8\u610f\uff1a\u4e0d\u662f\u51b2\u8981\u6761\u4ef6)\u662f\\(\\frac{\\partial f}{\\partial \\epsilon}=0\\)\u5176\u4e2d$$H = \\begin{bmatrix}\\frac{\\partial^2f}{\\partial x_1 \\partial x_1} &amp; \\cdots &amp; \\frac{\\partial^2f}{\\partial x_1 \\partial x_n} \\\\ \\vdots &amp; \\ddots &amp; \\vdots \\\\ \\frac{\\partial^2f}{\\partial x_n \\partial x_1} &amp; \\cdots &amp; \\frac{\\partial^2f}{\\partial x_n \\partial x_n}\\end{bmatrix} $$\u79f0\u4e4b\u4e3a\\(f\\)\u7684\\(Hessian\\)\u77e9\u9635\u3002\u56e0\u4e3a\u4e8c\u9636\u8fde\u7eed\u6df7\u5408\u7f16\u5bfc\u6570\u5177\u5907\u6027\u8d28$$\\frac{\\partial^2f}{\\partial x_i \\partial x_j} = \\frac{\\partial^2f}{\\partial x_j \\partial x_i}$$\u56e0\u6b64\\(Hessian\\)\u77e9\u9635\u4e3a\u5bf9\u79f0\u77e9\u9635\u3002\u6839\u636e\u77e9\u9635\u6c42\u5bfc\u6cd5\u5219\uff0c\u53ef\u4ee5\u5f97\u5230 $$\\frac{\\partial f}{\\partial \\epsilon}={\\nabla_x f}^T+\\epsilon^TH=0$$$$\\epsilon = -H^{-1}{\\nabla_x f}$$<\/p>\n<p>\u53ef\u89c1\uff0c\u725b\u987f\u6cd5\u7684\u601d\u8def\u662f\u5c06\u51fd\u6570f\u5728x\u5904\u5c55\u5f00\u4e3a\u591a\u5143\u4e8c\u6b21\u51fd\u6570\uff0c\u518d\u901a\u8fc7\u6c42\u89e3\u4e8c\u6b21\u51fd\u6570\u6700\u5c0f\u503c\u7684\u65b9\u6cd5\u5f97\u5230\u672c\u6b21\u8fed\u4ee3\u7684\u4e0b\u964d\u65b9\u5411\\(\\epsilon\\)\u3002\u90a3\u4e48\u95ee\u9898\u6765\u4e86\uff0c\u591a\u5143\u4e8c\u6b21\u51fd\u6570\u5728\u68af\u5ea6\u4e3a0\u7684\u5730\u65b9\u4e00\u5b9a\u5b58\u5728\u6700\u5c0f\u503c\u4e48\uff1f\u76f4\u89c9\u544a\u8bc9\u6211\u4eec\u662f\u4e0d\u4e00\u5b9a\u7684\u3002\u4ee5 \u4e00\u5143\u4e8c\u6b21\u51fd\u6570 \\(g(x)=ax^2+bx+c\\)\u4e3a\u4f8b\uff0c\u6211\u4eec\u77e5\u9053\u5f53\\(a&gt;0\\)\u65f6\uff0c\\(g(x)\\)\u53ef\u4ee5\u53d6\u5f97\u6700\u5c0f\u503c\uff0c\u5426\u5219\\(g(x)\\)\u4e0d\u5b58\u5728\u6700\u5c0f\u503c\u3002<\/p>\n<div id=\"attachment_1104\" style=\"width: 537px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-1104\" class=\"wp-image-1104 size-full\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2018\/07\/shape-of-the-graph.png\" alt=\"\" width=\"527\" height=\"214\" \/><p id=\"caption-attachment-1104\" class=\"wp-caption-text\">https:\/\/perfectmaths.wordpress.com\/2011\/08\/20\/chapter-3-%E2%80%93-quadratic-functions\/<\/p><\/div>\n<p>\u63a8\u5e7f\u5230\u591a\u5143\u7684\u60c5\u51b5\uff0c\u53ef\u4ee5\u5f97\u51fa\u4e8c\u6b21\u9879\u77e9\u9635\u5fc5\u987b\u662f\u6b63\u5b9a(positive definite)\u7684\uff0c\u5bf9\u5e94\u4e0a\u5f0f\u5373\\(Hessian\\)\u4e3a\u6b63\u5b9a\u77e9\u9635\u65f6\uff0c\u51fd\u6570\\(f(\\epsilon | x)\\)\u7684\u6700\u5c0f\u503c\u624d\u5b58\u5728\u3002<\/p>\n<p>\u56e0\u6b64\uff0c\u725b\u987f\u6cd5\u9996\u5148\u9700\u8981\u8ba1\u7b97\\(Hessian\\)\u77e9\u9635\u5e76\u4e14\u5224\u65ad\u5176\u6b63\u5b9a\u6027\uff0c\u5f53\\(Hessian\\)\u77e9\u9635\u6b63\u5b9a\uff0c\u6b64\u65f6\u5176\u6240\u6709\u7279\u5f81\u503c\u5747&gt;0,\u5f53\u7136\\(Hessian\\)\u77e9\u9635\u4e5f\u662f\u53ef\u9006\u7684\uff0c\u6700\u5c0f\u503c\u5b58\u5728\u3002<\/p>\n<p>\u9700\u8981\u6307\u51fa\u7684\u662f\uff0c\u5f53\u591a\u5143\u51fd\u6570 f \u672c\u8eab\u5c31\u662f\u4e8c\u6b21\u51fd\u6570\u5e76\u4e14\u5b58\u5728\u6700\u5c0f\u503c\u65f6\uff0c\u725b\u987f\u6cd5\u53ef\u4ee5\u4e00\u6b65\u89e3\u51fa\u6700\u5c0f\u503c\u3002<\/p>\n<p><strong><span style=\"text-decoration: underline;\">2.1 \u725b\u987f\u6cd5\u7684\u4f18\u70b9\uff1a<\/span><\/strong><\/p>\n<p>\u56e0\u4e3a\u76ee\u6807\u51fd\u6570\u5728\u63a5\u8fd1\u6781\u5c0f\u503c\u70b9\u9644\u8fd1\u63a5\u8fd1\u4e8c\u6b21\u51fd\u6570\uff0c\u56e0\u6b64\u5728\u6781\u5c0f\u503c\u70b9\u9644\u8fd1\uff0c\u725b\u987f\u6cd5\u7684\u6536\u655b\u901f\u5ea6\u8f83\u68af\u5ea6\u4e0b\u964d\u6cd5\u5feb\u7684\u591a\u3002\u5176\u4ed6\u6587\u732e\u5206\u6790\u5176\u6536\u655b\u901f\u5ea6\u4e3a2\u6b21\u6536\u655b\uff0c\u672c\u6587\u4e0d\u7ed9\u51fa\u63a8\u5bfc\u3002\u4e0b\u56fe\u662f\u725b\u987f\u6cd5\u5e94\u7528\u5728Rosenbrock\u51fd\u6570\u4e0a\u7684\u6548\u679c\uff1a<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1106\" src=\"http:\/\/www.whudj.cn\/wp-content\/uploads\/2018\/07\/Rosenbrock_newton.png\" alt=\"\" width=\"250\" height=\"233\" \/><\/p>\n<p><span style=\"text-decoration: underline;\"><strong>2.2 \u725b\u987f\u6cd5\u7684\u7f3a\u70b9\uff1a<\/strong><\/span><\/p>\n<p>1.\\(Hessian\\)\u77e9\u9635\u7684\u8ba1\u7b97\u96be\u5ea6\u975e\u5e38\u7684\u5927\u3002\u56e0\u6b64\u5728\u9ad8\u7ef4\u5ea6\u5e94\u7528\u6848\u4f8b\u4e2d\uff0c\u901a\u5e38\u4e0d\u4f1a\u8ba1\u7b97\\(Hessian\\)\u77e9\u9635\u3002\u56e0\u6b64\u725b\u987f\u6cd5\u4e5f\u4ea7\u751f\u4e86\u5f88\u591a\u53d8\u79cd\uff0c\u4e3b\u8981\u7684\u601d\u60f3\u5c31\u662f\u91c7\u7528\u5176\u4ed6\u77e9\u9635\u8fd1\u4f3c\\(Hessian\\)\u77e9\u9635\uff0c\u964d\u4f4e\u8ba1\u7b97\u590d\u6742\u5ea6\u3002<\/p>\n<p>2.\u725b\u987f\u6cd5\u5f53\\(Hessian\\)\u77e9\u9635\u4e3a\u6b63\u5b9a\u77e9\u9635\u65f6\uff0c\u6700\u5c0f\u503c\u624d\u5b58\u5728\u3002\u725b\u987f\u6cd5\u7ecf\u5e38\u4f1a\u56e0\u4e3a\\(Hessian\\)\u77e9\u9635\u4e0d\u6b63\u5b9a\u800c\u53d1\u6563(diverage)\u3002\u56e0\u6b64 \u725b\u987f\u6cd5\u5e76\u4e0d\u662f\u975e\u5e38\u7684\u7a33\u5b9a\u3002<\/p>\n<p><strong><span style=\"text-decoration: underline;\">2.3 \u725b\u987f\u6cd5\u6c42\u6839\u516c\u5f0f\u4e0e\u725b\u987f\u4f18\u5316\u6cd5\u4e4b\u95f4\u7684\u8054\u7cfb<\/span><\/strong><\/p>\n<p>\u5728\u8bf4\u9053\u725b\u987f\u4f18\u5316\u65b9\u6cd5\u7684\u65f6\u5019\uff0c\u4e0a\u8fc7\u300a\u8ba1\u7b97\u65b9\u6cd5\u300b\u8fd9\u95e8\u8bfe\u7684\u540c\u5b66\u7ecf\u5e38\u4f1a\u8bf4\uff0c\u725b\u987f\u6cd5\u4e0d\u662f\u7528\u6765\u6c42\u6839\u7684\u4e48\uff1f\u5b9e\u9645\u4e0a\uff0c\u725b\u987f\u4f18\u5316\u6cd5\u8fd8\u771f\u53ef\u4ee5\u7528\u725b\u987f\u6c42\u6839\u6cd5\u63a8\u5bfc\u5f97\u51fa\u3002\u6211\u770b\u5230\u7684\u6750\u6599\u662f Andrew Ng\u5728\u300a\u673a\u5668\u5b66\u4e60\u8bfe\u7a0b\u300b\u4e2d\u7ed9\u51fa\u7684\u4e00\u79cd\u63a8\u5bfc\u3002\u5728\u725b\u987f\u6c42\u6839\u516c\u5f0f\u4e2d\uff0c\\(f(x)=0\\)\u7684\u89e3\u7531\u8fed\u4ee3\u5f0f$$x_{i+1}=x_{i}-\\frac{f(x_i)}{f\\prime(x_i)}$$\u7ed9\u51fa\u3002\u5728\u725b\u987f\u4f18\u5316\u6cd5\u4e2d\uff0c\u6211\u4eec\u6b32\u6c42\u5f97\u68af\u5ea6\\(g(x)=f'(x)=0\\)\u5bf9\u5e94\u7684\\(x)\u3002<\/p>\n<p>\u56e0\u6b64 \\(x\\)\u53ef\u4ee5\u6839\u636e\u6c42\u6839\u516c\u5f0f\u00a0$$x_{i+1}=x_{i}-\\frac{f\\prime(x_i)}{f\\prime\\prime(x_i)}$$\u6c42\u51fa\u3002\u63a8\u5e7f\u5230\u591a\u5143\u51fd\u6570\u4e0a\uff0c\\({1}\/{f\\prime\\prime(x_i)}\\)\u6f14\u53d8\u4e3a\\(H^{-1}\\)\uff0c\\(f\\prime(x_i)\\)\u6f14\u53d8\u4e3a\\(\\nabla_x f(x_i)\\)\u56e0\u6b64$$x_{i+1}=x_{i}-H^{-1}{\\nabla_x f(x_i)}$$\u4e0e\u6839\u636e\u4e8c\u9636\u6cf0\u52d2\u5c55\u5f00\u5e76\u6c42\\(f(\\epsilon | x)\\)\u7684\u6700\u5c0f\u503c\u5f97\u5230\u7684\u7ed3\u8bba\u4e00\u81f4\u3002<\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>3.\u53c2\u8003\u6587\u732e\uff1a<\/strong><\/span><\/p>\n<p><a href=\"https:\/\/towardsdatascience.com\/gradient-descent-in-a-nutshell-eaf8c18212f0\">1.gradient descent in a nutshell &#8211; towardsdatascience.com<\/a><\/p>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Newton%27s_method_in_optimization\">2.Newton&#8217;s method in Optimization-wikipedia<\/a><\/p>\n<p><a href=\"https:\/\/people.rit.edu\/lxwast\/Linwei_Wangs_HomePage\/CIS820_files\/C3_GD.pdf\">3.Gradient Descent Method &#8211;\u00a0<\/a><a href=\"https:\/\/people.rit.edu\/lxwast\/Linwei_Wangs_HomePage\/CIS820_files\/C3_GD.pdf\">Rochester Institute of Technology<\/a><\/p>\n<p><a href=\"http:\/\/www.gatsby.ucl.ac.uk\/teaching\/courses\/ml2-2008\/graddescent.pdf\">4.Using Gradient Descent in Optimization and Learning &#8211; University Collage London<\/a><\/p>\n<p><a href=\"https:\/\/math.stackexchange.com\/questions\/1659452\/difference-between-gradient-descent-method-and-steepest-descent\">5.Difference between Gradient Descent method and Steepest Descent &#8211; stack exchange<\/a><\/p>\n<p><a href=\"https:\/\/www.quora.com\/In-optimization-why-is-Newtons-method-much-faster-than-gradient-descent\">6.In optimization, why is Newton&#8217;s method much faster than gradient descent?<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u68af\u5ea6\u4e0b\u964d\u6cd5\u4e0e\u725b\u987f\u6cd5\u662f\u6c42\u89e3\u6700\u5c0f\u503c\/\u4f18\u5316\u95ee\u9898\u7684\u4e24\u79cd\u7ecf\u5178\u7b97\u6cd5\u3002\u672c\u6587\u7684\u76ee\u6807\u662f\u4ecb\u7ecd\u4e24\u79cd\u7b97\u6cd5 &hellip; <a href=\"http:\/\/www.whudj.cn\/?p=1042\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/1042"}],"collection":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1042"}],"version-history":[{"count":57,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/1042\/revisions"}],"predecessor-version":[{"id":1129,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/1042\/revisions\/1129"}],"wp:attachment":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1042"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}