{"id":50,"date":"2017-11-10T04:58:58","date_gmt":"2017-11-09T12:58:58","guid":{"rendered":"http:\/\/119.29.206.68\/?p=50"},"modified":"2017-11-24T22:28:34","modified_gmt":"2017-11-24T14:28:34","slug":"%e6%9c%80%e5%b0%8f%e4%ba%8c%e4%b9%98%e6%b3%95%e7%9b%b4%e7%ba%bf%e6%8b%9f%e5%90%88axbyc0","status":"publish","type":"post","link":"http:\/\/www.whudj.cn\/?p=50","title":{"rendered":"\u6700\u5c0f\u4e8c\u4e58\u6cd5\u76f4\u7ebf\u62df\u5408:Ax+By+C=0"},"content":{"rendered":"<p>\u56e0\u4e3a\\( y\u00a0=kx+b\\)\u00a0\u5728\u659c\u7387\u65e0\u7a77\u5927\u6216\u63a5\u8fd1\u65e0\u7a77\u5927\u65f6\u7684\u6570\u503c\u8ba1\u7b97\u95ee\u9898\uff0c\u6240\u4ee5\u5728\u76f4\u7ebf\u65b9\u7a0b\u7684\u9009\u62e9\u4e0a\u9009\u7528\u66f4\u4e00\u822c\u7684\u5f62\u5f0f\uff1a$$Ax+By+C=0$$<!--more--><br \/>\n\u5df2\u77e5$$\u00a0 (x_1,y_1),(x_2,y_2),&#8230;,(x_n,y_n)$$\u6c42\u672a\u77e5\u6570\\(A,B,C\\)\u4f7f\u5f97\u00a0\\(x_i\\)\u00a0\u5230\u00a0\u76f4\u7ebf\u00a0$$Ax+By+C=0$$\u00a0\u7684\u8ddd\u79bb\u7684\u5e73\u65b9\u548c\u6700\u5c0f<br \/>\n$$ f=\\sum_{i=1}^n\u00a0(\\frac{|Ax_i+By_i+C|}{\\sqrt{A^2+B^2}})^2$$\u56e0\u4e3aA,B\u53ef\u4ee5\u6210\u6bd4\u4f8b\u7684\u53d8\u5316\uff0c\u6240\u4ee5\u53ef\u4ee5\u6dfb\u52a0\u4e00\u4e2a\u7ea6\u675f\u6761\u4ef6\uff1a$$A^2+B^2=1$$\u6240\u4ee5\u4e0a\u9762\u7b97\u5f0f\u53ef\u4ee5\u7b80\u5316\u4e3a<br \/>\n$$f=\\sum_{i=1}^n(Ax_i+By_i+C)^2$$\u4ee4\\(f\\)\u00a0\u5bf9\u00a0\\(C\\)\u6c42\u504f\u5bfc\u6570\u5f97\u5230$$ \\frac{\\partial\u00a0f}{\\partial\u00a0C}=2(A\\sum\u00a0x+B\\sum\u00a0y+nC)=0$$\u00a0\u89e3\\(C\\)\u5f97\u5230\u00a0\\( C=-\\frac{A\\sum\u00a0x\u00a0+\u00a0\u00a0B\\sum\u00a0y}{n}\u00a0\\)\u3002\u5373$$C=-A\\bar\u00a0x\u00a0-B\u00a0\\bar\u00a0y$$\u3002\u5e26\u5165\u4e0a\u9762\u7b97\u5f0f<br \/>\n$$ f=\\sum(A(x_i-\\bar\u00a0x)+B(y_i\u00a0-\\bar\u00a0y))^2\u00a0=\u00a0\\sum\u00a0(Ap+Bq)^2\u00a0$$\u00a0$$ (p_i\u00a0=\u00a0x_i-\\bar\u00a0x,q_i\u00a0=\u00a0y_i\u00a0&#8211;\u00a0\\bar\u00a0y)$$<br \/>\n\u53ef\u4ee5\u5199\u6210\u00a0\u77e9\u9635\u4e58\u6cd5\u5f62\u5f0f<br \/>\n$$f\u00a0=\u00a0\\begin{bmatrix}A\\\\B\u00a0\\end{bmatrix}^T\\begin{bmatrix}\\sum\u00a0p^2&amp;\u00a0\\sum\u00a0pq\\\\\u00a0\\sum\u00a0pq\u00a0&amp;\u00a0\\sum\u00a0q^2\\end{bmatrix}\u00a0\\begin{bmatrix}A\\\\B\\end{bmatrix}$$<br \/>\n\u5bf9\u5e94\u7b80\u5199\u4e3a\u00a0\\( f\u00a0=\u00a0v^TSv\\)\u3002\u5199\u5230\u8fd9\u91cc\uff0c\u95ee\u9898\u8f6c\u53d8\u4e3a\u4e8c\u6b21\u578b\u6c42\u6700\u5c0f\u503c\u7684\u95ee\u9898\u3002\u5728\u7ebf\u6027\u4ee3\u6570\u8bfe\u672c\u4e0a\u53ef\u80fd\u5df2\u7ecf\u5199\u51fa\u4e86\u95ee\u9898\u7684\u89e3\uff0c\u5373\u00a0\\( v=\\begin{bmatrix}\u00a0A\\\\B\\end{bmatrix}\\)\u7684\u503c\u4e3aS\u5bf9\u5e94\u6700\u5c0f\u7279\u5f81\u503c\u65f6\u7684\u7279\u5f81\u5411\u91cf\u3002<br \/>\n\u91c7\u7528Eigen\u5e93\u7684<a href=\"http:\/\/eigen.tuxfamily.org\/dox\/classEigen_1_1EigenSolver.html\">EigenSolver<\/a>\u53ef\u4ee5\u8ba1\u7b97\u7279\u5f81\u503c\u548c\u7279\u5f81\u5411\u91cf\u3002\u503c\u5f97\u63d0\u5230\u7684\u662f\u00a0Eigen\u00a0\u7684eigenvalues()&lt;\/\u65b9\u6cd5\u8fd4\u56de\u7684\u662fstd::complex&lt;double&gt; \u590d\u6570\u6570\u7ec4\uff0c\u56e0\u4e3a\u00a0\\( S\\)\u00a0\u4e3a\u5b9e\u5bf9\u79f0\u77e9\u9635\uff0c\u6240\u4ee5\u5176\u7279\u5f81\u503c\u4e3a\u00a0\u5b9e\u6570\uff0c\u5373\u53d6 complex&lt;double&gt;::real()\u65b9\u6cd5\u5c31\u53ef\u4ee5\u4e86\u3002<br \/>\n\u89e3\u51fa\u4e86A,B\u00a0\uff0c\u53c2\u6570C\u901a\u8fc7\u5f00\u59cb\u7684\u516c\u5f0f\u53ef\u4ee5\u6c42\u51fa\u3002<\/p>\n<p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u6709\u5c0f\u4f19\u4f34\u5e0c\u671b\u7ed9\u51fa\u00a0\u4e3a\u4ec0\u4e48v\u7684\u503c\u662f\u5bf9\u5e94S\u7279\u5f81\u503c\u4e3a\u6700\u5c0f\u65f6\u7684\u7279\u5f81\u5411\u91cf\u7684\u503c\uff0c\u8fd9\u91cc\u6211\u5c1d\u8bd5\u7ed9\u51fa\u8bf4\u660e\u3002<br \/>\n\u56e0\u4e3a\\(S\\)\u00a0\u4e3a\u5b9e\u5bf9\u79f0\u77e9\u9635\uff0c\u5176\u53ef\u4ee5\u5bf9\u89d2\u5316\u5206\u89e3\u4e3a\u00a0\\( S=\u00a0PDP^{-1}=PDP^T\\)$$ f=v^TSv\u00a0=\u00a0(v^TP)D(v^TP)^T$$<br \/>\nD\u4e3a\u7279\u5f81\u503c\u5bf9\u89d2\u77e9\u9635\uff0cP\u4e3a\u5bf9\u5e94\u7684\u7279\u5f81\u5411\u91cf\u3002<br \/>\n\\(v^tP\u00a0=[\u00a0v^tP_1,v^tP_2]\u00a0=[u_1,u_2]\\)\u4e3a\u5411\u91cfv\u4e0ep\u7684\u70b9\u79ef\uff0c\u5176\u8303\u56f4\u5728-1\u52301\u4e4b\u95f4\u3002<br \/>\n$$f=\u00a0u_1^2\\lambda\u00a0_1\u00a0+\u00a0u_2^2\\lambda\u00a0_2$$,\u56e0\u4e3a\\( p_0,p1\\)\u662f\u6b63\u4ea4\u7684\uff0cv\u7684\u6a21\u957f\u4e3a1\uff0c\u53ef\u4ee5\u5047\u8bbe\\( p_1,p_2\\)\u7684\u5750\u6807\u4e3a\\((1,0),(0,1)\\)\uff0cv\u7684\u5750\u6807\u4e3a\\((x,y),\u00a0 x^2+y^2=1\\) \u3002\\(\\lambda_1&gt;\\lambda_2\\)<\/p>\n<p>$$f=u_1^2\\lambda\u00a0_1\u00a0+\u00a0u_2^2\\lambda\u00a0_2 = x^2\\lambda\u00a0_1 + y^2\\lambda\u00a0_2 = \\lambda_2 + (\\lambda_1-\\lambda_2)x^2$$<\/p>\n<p>\u5f53 \\((x,y) = (0,1) \\) \u5373\u5f53v\u4e0e\u8f83\u5c0f\u7684\\(\\lambda\\)\u5bf9\u5e94\u7684\\(p\\)\u5171\u7ebf\uff0c\u800c\u4e0e\u8f83\u5927\u7684\\( \\lambda\\)\u6b63\u4ea4\u7684\u65f6\u5019\uff0c\\(f\\)\u53ef\u4ee5\u53d6\u6700\u5c0f\u503c\u3002<br \/>\n\u53ef\u80fd\u6309\u7167\u6559\u79d1\u4e66\uff0c\u6709\u66f4\u89c4\u8303\u7684\u8bc1\u660e\u65b9\u5f0f\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\\( y\u00a0=kx+b\\)\u00a0\u5728\u659c\u7387\u65e0\u7a77\u5927\u6216\u63a5\u8fd1\u65e0\u7a77\u5927\u65f6\u7684\u6570\u503c\u8ba1\u7b97\u95ee\u9898\uff0c\u6240\u4ee5\u5728\u76f4 &hellip; <a href=\"http:\/\/www.whudj.cn\/?p=50\">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":[7,8,10],"_links":{"self":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/50"}],"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=50"}],"version-history":[{"count":10,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":306,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=\/wp\/v2\/posts\/50\/revisions\/306"}],"wp:attachment":[{"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.whudj.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}