{"id":4062,"date":"2023-07-13T20:58:15","date_gmt":"2023-07-13T20:58:15","guid":{"rendered":"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/"},"modified":"2023-07-13T20:58:15","modified_gmt":"2023-07-13T20:58:15","slug":"python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/","title":{"rendered":"\u5982\u4f55\u5728 python \u4e2d\u4f7f\u7528 elbow \u65b9\u6cd5\u67e5\u627e\u6700\u4f73\u7c07"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/cn\/\u7edf\u8ba1\u5b66\u4ee5\u7b80\u5355\u76f4\u63a5\u7684\u65b9\u5f0f\u89e3\u91ca\u6982\u5ff5\uff0c\u6211\u4eec\u4f7f\u5b66\u4e60\u7edf\u8ba1\u53d8\u5f97\u66f4\u5bb9\u6613\/\" target=\"_blank\" rel=\"noopener\">\u673a\u5668\u5b66\u4e60<\/a>\u4e2d\u6700\u5e38\u89c1\u7684\u805a\u7c7b\u7b97\u6cd5\u4e4b\u4e00\u79f0\u4e3a<strong>k \u5747\u503c\u805a\u7c7b<\/strong>\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">K \u5747\u503c\u805a\u7c7b\u662f\u4e00\u79cd\u5c06\u6570\u636e\u96c6\u4e2d\u7684\u6bcf\u4e2a\u89c2\u5bdf\u7ed3\u679c\u653e\u5165<em>K<\/em>\u4e2a\u805a\u7c7b\u4e2d\u7684\u4e00\u4e2a\u6280\u672f\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6700\u7ec8\u76ee\u6807\u662f\u62e5\u6709<em>K \u4e2a<\/em>\u7c07\uff0c\u5176\u4e2d\u6bcf\u4e2a\u7c07\u5185\u7684\u89c2\u5bdf\u7ed3\u679c\u5f7c\u6b64\u975e\u5e38\u76f8\u4f3c\uff0c\u800c\u4e0d\u540c\u7c07\u4e2d\u7684\u89c2\u5bdf\u7ed3\u679c\u5f7c\u6b64\u975e\u5e38\u4e0d\u540c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5728\u8fdb\u884c k \u5747\u503c\u805a\u7c7b\u65f6\uff0c\u7b2c\u4e00\u6b65\u662f\u9009\u62e9<em>K<\/em>\u503c\u2014\u2014\u6211\u4eec\u60f3\u8981\u5c06\u89c2\u6d4b\u503c\u653e\u5165\u7684\u805a\u7c7b\u6570\u91cf\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u9009\u62e9<em>K<\/em>\u503c\u7684\u6700\u5e38\u89c1\u65b9\u6cd5\u4e4b\u4e00\u79f0\u4e3a<strong>\u8098\u6cd5<\/strong>\uff0c\u8be5\u65b9\u6cd5\u6d89\u53ca\u521b\u5efa\u4e00\u4e2a\u56fe\uff0c\u5176\u4e2d x \u8f74\u4e3a\u7c07\u6570\uff0cy \u8f74\u4e3a\u5e73\u65b9\u548c\u603b\u6570\uff0c\u7136\u540e\u786e\u5b9a\u56fe\u4e2d\u51fa\u73b0\u201c\u819d\u76d6\u201d\u6216\u8f6c\u5f2f\u7684\u5730\u65b9\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\">x \u8f74\u4e0a\u51fa\u73b0\u201c\u62d0\u70b9\u201d\u7684\u70b9\u544a\u8bc9\u6211\u4eec\u5728 k \u5747\u503c\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u91cf\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u793a\u4f8b\u5c55\u793a\u4e86\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528\u8098\u90e8\u65b9\u6cd5\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u7b2c1\u6b65\uff1a\u5bfc\u5165\u5fc5\u8981\u7684\u6a21\u5757<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u9996\u5148\uff0c\u6211\u4eec\u5c06\u5bfc\u5165\u6267\u884c k \u5747\u503c\u805a\u7c7b\u6240\u9700\u7684\u6240\u6709\u6a21\u5757\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd\n<span style=\"color: #008000;\">import<\/span> numpy <span style=\"color: #008000;\">as<\/span> np\n<span style=\"color: #008000;\">import<\/span> matplotlib. <span style=\"color: #3366ff;\">pyplot<\/span> <span style=\"color: #008000;\">as<\/span> plt\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">cluster<\/span> <span style=\"color: #008000;\">import<\/span> KMeans\n<span style=\"color: #008000;\">from<\/span> sklearn. <span style=\"color: #3366ff;\">preprocessing<\/span> <span style=\"color: #008000;\">import<\/span> StandardScaler<\/strong><\/span><\/pre>\n<h2><span style=\"color: #000000;\"><strong>\u7b2c 2 \u6b65\uff1a\u521b\u5efa\u6570\u636e\u6846<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u5305\u542b 20 \u540d\u4e0d\u540c\u7bee\u7403\u8fd0\u52a8\u5458\u7684\u4e09\u4e2a\u53d8\u91cf\u7684 DataFrame\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <span style=\"color: #000000;\"><strong><span style=\"color: #008080;\">#createDataFrame\n<\/span>df = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #ff0000;\">points<\/span> ': [18, np.nan, 19, 14, 14, 11, 20, 28, 30, 31,\n                              35, 33, 29, 25, 25, 27, 29, 30, 19, 23],\n                   ' <span style=\"color: #ff0000;\">assists<\/span> ': [3, 3, 4, 5, 4, 7, 8, 7, 6, 9, 12, 14,\n                               np.nan, 9, 4, 3, 4, 12, 15, 11],\n                   ' <span style=\"color: #ff0000;\">rebounds<\/span> ': [15, 14, 14, 10, 8, 14, 13, 9, 5, 4,\n                                11, 6, 5, 5, 3, 8, 12, 7, 6, 5]})\n\n<span style=\"color: #008080;\">#drop rows with NA values in any columns\n<span style=\"color: #000000;\">df = df. <span style=\"color: #3366ff;\">dropna<\/span> ()<\/span>\n\n#create scaled DataFrame where each variable has mean of 0 and standard dev of 1\n<span style=\"color: #000000;\">scaled_df = StandardScaler(). <span style=\"color: #3366ff;\">fit_transform<\/span> (df)\n<\/span><\/span><\/strong><\/span><\/pre>\n<h2><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 3\uff1a\u4f7f\u7528\u8098\u90e8\u6cd5\u627e\u5230\u6700\u4f73\u7c07\u6570<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u5047\u8bbe\u6211\u4eec\u60f3\u8981\u4f7f\u7528 k \u5747\u503c\u805a\u7c7b\u6839\u636e\u8fd9\u4e09\u4e2a\u6307\u6807\u5c06\u76f8\u4f3c\u7684\u53c2\u4e0e\u8005\u5206\u7ec4\u5728\u4e00\u8d77\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8981\u5728 Python \u4e2d\u6267\u884c k \u5747\u503c\u805a\u7c7b\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528<strong>sklearn<\/strong>\u6a21\u5757\u4e2d\u7684<a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.cluster.KMeans.html\" target=\"_blank\" rel=\"noopener\">KMeans<\/a>\u51fd\u6570\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8be5\u51fd\u6570\u6700\u91cd\u8981\u7684\u53c2\u6570\u662f<strong>n_clusters<\/strong> \uff0c\u5b83\u6307\u5b9a\u8981\u5728\u5176\u4e2d\u653e\u7f6e\u89c2\u6d4b\u503c\u7684\u7c07\u6570\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u786e\u5b9a\u6700\u4f73\u7c07\u6570\uff0c\u6211\u4eec\u5c06\u521b\u5efa\u4e00\u4e2a\u56fe\u8868\uff0c\u663e\u793a\u7c07\u6570\u4ee5\u53ca\u6a21\u578b\u7684 SSE\uff08\u8bef\u5dee\u5e73\u65b9\u548c\uff09\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7136\u540e\uff0c\u6211\u4eec\u5c06\u5bfb\u627e\u5e73\u65b9\u548c\u5f00\u59cb\u201c\u5f2f\u66f2\u201d\u6216\u7a33\u5b9a\u7684\u201c\u819d\u76d6\u201d\u3002\u8be5\u70b9\u4ee3\u8868\u6700\u4f73\u7c07\u6570\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u521b\u5efa\u8fd9\u79cd\u7c7b\u578b\u7684\u56fe\uff0c\u8be5\u56fe\u5728 x \u8f74\u4e0a\u663e\u793a\u7c07\u6570\uff0c\u5728 y \u8f74\u4e0a\u663e\u793a SSE\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#initialize kmeans parameters\n<\/span>kmeans_kwargs = {\n\" <span style=\"color: #ff0000;\">init<\/span> \": \" <span style=\"color: #ff0000;\">random<\/span> \",\n\" <span style=\"color: #ff0000;\">n_init<\/span> \": 10,\n\" <span style=\"color: #ff0000;\">random_state<\/span> \": 1,\n}\n\n<span style=\"color: #008080;\">#create list to hold SSE values for each k\n<\/span>sse = []\n<span style=\"color: #008000;\">for<\/span> k <span style=\"color: #008000;\">in<\/span> range(1, 11):\n    kmeans = KMeans(n_clusters=k, <span style=\"color: #800080;\">**<\/span> kmeans_kwargs)\n    kmeans. <span style=\"color: #3366ff;\">fit<\/span> (scaled_df)\n    sse. <span style=\"color: #3366ff;\">append<\/span> (kmeans.inertia_)\n\n<span style=\"color: #008080;\">#visualize results\n<\/span>plt. <span style=\"color: #3366ff;\">plot<\/span> (range(1, 11), sse)\nplt. <span style=\"color: #3366ff;\">xticks<\/span> (range(1, 11))\nplt. <span style=\"color: #3366ff;\">xlabel<\/span> (\" <span style=\"color: #ff0000;\">Number of Clusters<\/span> \")\nplt. <span style=\"color: #3366ff;\">ylabel<\/span> (\u201c <span style=\"color: #ff0000;\">SSE<\/span> \u201d)\nplt. <span style=\"color: #3366ff;\">show<\/span> ()<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\" wp-image-29557 aligncenter\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/kmmoyenne1.jpg\" alt=\"\" width=\"531\" height=\"408\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u5728\u6b64\u56fe\u4e2d\uff0c\u4f3c\u4e4e\u5728 k = <strong>3 \u4e2a\u7c07<\/strong>\u5904\u5b58\u5728\u626d\u7ed3\u6216\u201c\u62d0\u70b9\u201d\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u56e0\u6b64\uff0c\u5728\u4e0b\u4e00\u6b65\u62df\u5408 k \u5747\u503c\u805a\u7c7b\u6a21\u578b\u65f6\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 3 \u4e2a\u805a\u7c7b\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u6b65\u9aa4 4\uff1a\u4f7f\u7528\u6700\u4f73<em>K<\/em>\u6267\u884c K \u5747\u503c\u805a\u7c7b<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u4f7f\u7528<em>k<\/em>\u7684\u6700\u4f73\u503c 3 \u5bf9\u6570\u636e\u96c6\u6267\u884c k \u5747\u503c\u805a\u7c7b\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008080;\">#instantiate the k-means class, using optimal number of clusters\n<\/span>kmeans = KMeans(init=\" <span style=\"color: #ff0000;\">random<\/span> \", n_clusters= <span style=\"color: #008000;\">3<\/span> , n_init= <span style=\"color: #008000;\">10<\/span> , random_state= <span style=\"color: #008000;\">1<\/span> )\n\n<span style=\"color: #008080;\">#fit k-means algorithm to data\n<\/span>kmeans. <span style=\"color: #3366ff;\">fit<\/span> (scaled_df)\n\n<span style=\"color: #008080;\">#view cluster assignments for each observation\n<\/span>kmeans. <span style=\"color: #3366ff;\">labels_\n\n<\/span>array([1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 2, 2, 2, 0, 0, 0]) \n<\/span><\/span><\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u7ed3\u679c\u8868\u663e\u793a\u4e86 DataFrame \u4e2d\u6bcf\u4e2a\u89c2\u5bdf\u503c\u7684\u805a\u7c7b\u5206\u914d\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u4f7f\u8fd9\u4e9b\u7ed3\u679c\u66f4\u6613\u4e8e\u89e3\u91ca\uff0c\u6211\u4eec\u53ef\u4ee5\u5728 DataFrame \u4e2d\u6dfb\u52a0\u4e00\u5217\u6765\u663e\u793a\u6bcf\u4e2a\u73a9\u5bb6\u7684\u96c6\u7fa4\u5206\u914d\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008080;\">#append cluster assingments to original DataFrame\n<\/span>df[' <span style=\"color: #ff0000;\">cluster<\/span> '] = kmeans. <span style=\"color: #3366ff;\">labels_<\/span>\n\n<span style=\"color: #008080;\">#view updated DataFrame\n<\/span><span style=\"color: #008000;\">print<\/span> (df)\n\n<\/span><\/span>points assists rebounds cluster\n0 18.0 3.0 15 1\n2 19.0 4.0 14 1\n3 14.0 5.0 10 1\n4 14.0 4.0 8 1\n5 11.0 7.0 14 1\n6 20.0 8.0 13 1\n7 28.0 7.0 9 2\n8 30.0 6.0 5 2\n9 31.0 9.0 4 0\n10 35.0 12.0 11 0\n11 33.0 14.0 6 0\n13 25.0 9.0 5 0\n14 25.0 4.0 3 2\n15 27.0 3.0 8 2\n16 29.0 4.0 12 2\n17 30.0 12.0 7 0\n18 19.0 15.0 6 0\n19 23.0 11.0 5 0\n<\/strong><\/pre>\n<p><span style=\"color: #000000;\"><strong>\u96c6\u7fa4<\/strong>\u5217\u5305\u542b\u6bcf\u4e2a\u73a9\u5bb6\u5206\u914d\u5230\u7684\u96c6\u7fa4\u7f16\u53f7\uff080\u30011 \u6216 2\uff09\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5c5e\u4e8e\u540c\u4e00\u7c07\u7684\u7403\u5458\u7684<strong>\u5f97\u5206<\/strong>\u3001<strong>\u52a9\u653b<\/strong>\u548c<strong>\u7bee\u677f<\/strong>\u6570\u5217\u7684\u503c\u5927\u81f4\u76f8\u4f3c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u6ce8\u610f<\/strong>\uff1a\u60a8\u53ef\u4ee5<a href=\"https:\/\/scikit-learn.org\/stable\/modules\/generated\/sklearn.cluster.KMeans.html\" target=\"_blank\" rel=\"noopener\">\u5728\u6b64\u5904<\/a>\u627e\u5230<strong>sklearn<\/strong>\u7684<strong>KMeans<\/strong>\u51fd\u6570\u7684\u5b8c\u6574\u6587\u6863\u3002<\/span><\/p>\n<h2><span style=\"color: #000000;\"><strong>\u5176\u4ed6\u8d44\u6e90<\/strong><\/span><\/h2>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u6559\u7a0b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u5176\u4ed6\u5e38\u89c1\u4efb\u52a1\uff1a<\/span><\/p>\n<p><a href=\"https:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f52-python\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7ebf\u6027\u56de\u5f52<\/a><br \/><a href=\"https:\/\/statorials.org\/cn\/\u903b\u8f91\u56de\u5f52-python\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u903b\u8f91\u56de\u5f52<\/a><br \/><a href=\"https:\/\/statorials.org\/cn\/python\u4e2d\u7684k\u6298\u4ea4\u53c9\u9a8c\u8bc1\/\" target=\"_blank\" rel=\"noopener\">\u5982\u4f55\u5728Python\u4e2d\u6267\u884cK-Fold\u4ea4\u53c9\u9a8c\u8bc1<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u673a\u5668\u5b66\u4e60\u4e2d\u6700\u5e38\u89c1\u7684\u805a\u7c7b\u7b97\u6cd5\u4e4b\u4e00\u79f0\u4e3ak \u5747\u503c\u805a\u7c7b\u3002 K \u5747\u503c\u805a\u7c7b\u662f\u4e00\u79cd\u5c06\u6570\u636e\u96c6\u4e2d\u7684\u6bcf\u4e2a\u89c2\u5bdf\u7ed3\u679c\u653e\u5165K\u4e2a\u805a\u7c7b\u4e2d\u7684\u4e00 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-4062","post","type-post","status-publish","format-standard","hentry","category-11"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u6700\u4f73\u805a\u7c7b - Statorials<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/statorials.org\/cn\/python\u4e2d\u7684\u8098\u90e8\u65b9\u6cd5\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u6700\u4f73\u805a\u7c7b - Statorials\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/python\u4e2d\u7684\u8098\u90e8\u65b9\u6cd5\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-13T20:58:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/kmmoyenne1.jpg\" \/>\n<meta name=\"author\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/\",\"url\":\"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/\",\"name\":\"\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u6700\u4f73\u805a\u7c7b - Statorials\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-13T20:58:15+00:00\",\"dateModified\":\"2023-07-13T20:58:15+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u5728 python \u4e2d\u4f7f\u7528 elbow \u65b9\u6cd5\u67e5\u627e\u6700\u4f73\u7c07\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/statorials.org\/cn\/#website\",\"url\":\"https:\/\/statorials.org\/cn\/\",\"name\":\"Statorials\",\"description\":\"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/statorials.org\/cn\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\",\"name\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"contentUrl\":\"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg\",\"caption\":\"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a\"},\"description\":\"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a\",\"sameAs\":[\"https:\/\/statorials.org\/cn\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u6700\u4f73\u805a\u7c7b - Statorials","description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/statorials.org\/cn\/python\u4e2d\u7684\u8098\u90e8\u65b9\u6cd5\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u6700\u4f73\u805a\u7c7b - Statorials","og_description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u3002","og_url":"https:\/\/statorials.org\/cn\/python\u4e2d\u7684\u8098\u90e8\u65b9\u6cd5\/","og_site_name":"Statorials","article_published_time":"2023-07-13T20:58:15+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/kmmoyenne1.jpg"}],"author":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/","url":"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/","name":"\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u6700\u4f73\u805a\u7c7b - Statorials","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-13T20:58:15+00:00","dateModified":"2023-07-13T20:58:15+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u4ecb\u7ecd\u5982\u4f55\u5728 Python \u4e2d\u4f7f\u7528 Elbow \u65b9\u6cd5\u6765\u67e5\u627e\u805a\u7c7b\u7b97\u6cd5\u4e2d\u4f7f\u7528\u7684\u6700\u4f73\u805a\u7c7b\u6570\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/python%e4%b8%ad%e7%9a%84%e8%82%98%e9%83%a8%e6%96%b9%e6%b3%95\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728 python \u4e2d\u4f7f\u7528 elbow \u65b9\u6cd5\u67e5\u627e\u6700\u4f73\u7c07"}]},{"@type":"WebSite","@id":"https:\/\/statorials.org\/cn\/#website","url":"https:\/\/statorials.org\/cn\/","name":"Statorials","description":"\u60a8\u7684\u7edf\u8ba1\u7d20\u517b\u6307\u5357\uff01","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/statorials.org\/cn\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261","name":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/image\/","url":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","contentUrl":"https:\/\/statorials.org\/cn\/wp-content\/uploads\/2023\/10\/Dr.-Benjamin-Anderson-96x96.jpg","caption":"\u672c\u6770\u660e\u00b7\u5b89\u5fb7\u68ee\u535a"},"description":"\u5927\u5bb6\u597d\uff0c\u6211\u662f\u672c\u6770\u660e\uff0c\u4e00\u4f4d\u9000\u4f11\u7684\u7edf\u8ba1\u5b66\u6559\u6388\uff0c\u540e\u6765\u6210\u4e3a Statorials \u7684\u70ed\u5fc3\u6559\u5e08\u3002 \u51ed\u501f\u5728\u7edf\u8ba1\u9886\u57df\u7684\u4e30\u5bcc\u7ecf\u9a8c\u548c\u4e13\u4e1a\u77e5\u8bc6\uff0c\u6211\u6e34\u671b\u5206\u4eab\u6211\u7684\u77e5\u8bc6\uff0c\u901a\u8fc7 Statorials \u589e\u5f3a\u5b66\u751f\u7684\u80fd\u529b\u3002\u4e86\u89e3\u66f4\u591a","sameAs":["https:\/\/statorials.org\/cn"]}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/4062","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/comments?post=4062"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/4062\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=4062"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=4062"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=4062"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}