{"id":1152,"date":"2023-07-27T12:04:19","date_gmt":"2023-07-27T12:04:19","guid":{"rendered":"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/"},"modified":"2023-07-27T12:04:19","modified_gmt":"2023-07-27T12:04:19","slug":"python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92","status":"publish","type":"post","link":"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/","title":{"rendered":"\u5982\u4f55\u5728 python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09"},"content":{"rendered":"<p><\/p>\n<hr>\n<p><span style=\"color: #000000;\"><a href=\"https:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f521\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u7b80\u5355\u7ebf\u6027\u56de\u5f52<\/a>\u662f\u4e00\u79cd\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u7406\u89e3\u5355\u4e2a<a href=\"https:\/\/statorials.org\/cn\/\u53d8\u91cf\u89e3\u91ca\u6027\u53cd\u5e94\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u89e3\u91ca\u53d8\u91cf<\/a>\u548c\u5355\u4e2a<a href=\"https:\/\/statorials.org\/cn\/\u53d8\u91cf\u89e3\u91ca\u6027\u53cd\u5e94\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u54cd\u5e94\u53d8\u91cf<\/a>\u4e4b\u95f4\u5173\u7cfb\u7684\u6280\u672f\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u8be5\u6280\u672f\u627e\u5230\u4e00\u6761\u6700\u201c\u9002\u5408\u201d\u6570\u636e\u7684\u7ebf\uff0c\u5e76\u91c7\u7528\u4ee5\u4e0b\u5f62\u5f0f\uff1a<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>\u0177 = b <sub>0<\/sub> + b <sub>1<\/sub> x<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u91d1\u5b50\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>\u0177<\/strong> : \u4f30\u8ba1\u54cd\u5e94\u503c<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>b <sub>0<\/sub><\/strong> \uff1a\u56de\u5f52\u7ebf\u7684\u539f\u70b9<\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>b <sub>1<\/sub><\/strong> \uff1a\u56de\u5f52\u7ebf\u7684\u659c\u7387<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u8be5\u65b9\u7a0b\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u7406\u89e3\u89e3\u91ca\u53d8\u91cf\u548c\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u5e76\u4e14\uff08\u5047\u8bbe\u5b83\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\uff09\u5b83\u53ef\u4ee5\u7528\u4e8e\u5728\u7ed9\u5b9a\u89e3\u91ca\u53d8\u91cf\u503c\u7684\u60c5\u51b5\u4e0b\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u7684\u503c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u672c\u6559\u7a0b\u63d0\u4f9b\u6709\u5173\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u7684\u5206\u6b65\u8bf4\u660e\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><b>\u7b2c 1 \u6b65\uff1a\u52a0\u8f7d\u6570\u636e<\/b><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5bf9\u4e8e\u6b64\u793a\u4f8b\uff0c\u6211\u4eec\u5c06\u4e3a 15 \u540d\u5b66\u751f\u521b\u5efa\u4e00\u4e2a\u5305\u542b\u4ee5\u4e0b\u4e24\u4e2a\u53d8\u91cf\u7684\u5047\u6570\u636e\u96c6\uff1a<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">\u67d0\u4e9b\u8003\u8bd5\u7684\u5b66\u4e60\u603b\u5c0f\u65f6\u6570<\/span><\/li>\n<li><span style=\"color: #000000;\">\u8003\u8bd5\u6210\u7ee9<\/span><\/li>\n<\/ul>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u5c06\u5c1d\u8bd5\u4f7f\u7528<em>\u5c0f\u65f6\u6570<\/em>\u4f5c\u4e3a\u89e3\u91ca\u53d8\u91cf\u3001<em>\u68c0\u67e5\u7ed3\u679c<\/em>\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\u6765\u62df\u5408\u4e00\u4e2a\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u5728 Python \u4e2d\u521b\u5efa\u8fd9\u4e2a\u5047\u6570\u636e\u96c6\uff1a<\/span><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\"><span style=\"color: #000000;\"><span style=\"color: #008000;\">import<\/span> pandas <span style=\"color: #008000;\">as<\/span> pd<\/span>\n\n#create dataset<\/span>\ndf = pd. <span style=\"color: #3366ff;\">DataFrame<\/span> ({' <span style=\"color: #993300;\">hours<\/span> ': [1, 2, 4, 5, 5, 6, 6, 7, 8, 10, 11, 11, 12, 12, 14],\n                   ' <span style=\"color: #993300;\">score<\/span> ': [64, 66, 76, 73, 74, 81, 83, 82, 80, 88, 84, 82, 91, 93, 89]})\n      \n\n<span style=\"color: #008080;\">#view first six rows of dataset\n<\/span>df[0:6]\n\n    hours score\n0 1 64\n1 2 66\n2 4 76\n3 5 73\n4 5 74\n5 6 81\n<\/strong><\/pre>\n<h3><span style=\"color: #000000;\"><b>\u7b2c 2 \u6b65\uff1a\u53ef\u89c6\u5316\u6570\u636e<\/b><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5728\u62df\u5408\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u4e4b\u524d\uff0c\u6211\u4eec\u5fc5\u987b\u9996\u5148\u5c06\u6570\u636e\u53ef\u89c6\u5316\u4ee5\u7406\u89e3\u5b83\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u9996\u5148\uff0c\u6211\u4eec\u8981\u786e\u4fdd<em>\u5c0f\u65f6\u6570<\/em>\u548c<em>\u5206\u6570<\/em>\u4e4b\u95f4\u7684\u5173\u7cfb\u8fd1\u4f3c\u7ebf\u6027\uff0c\u56e0\u4e3a\u8fd9\u662f\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u7684 <a href=\"https:\/\/statorials.org\/cn\/\u7ebf\u6027\u56de\u5f52\u5047\u8bbe\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u57fa\u672c\u5047\u8bbe<\/a>\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u7b80\u5355\u7684\u6563\u70b9\u56fe\u6765\u53ef\u89c6\u5316\u4e24\u4e2a\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> matplotlib.pyplot <span style=\"color: #008000;\">as<\/span> plt\n\nplt. <span style=\"color: #3366ff;\">scatter<\/span> (df.hours, df.score)\nplt. <span style=\"color: #3366ff;\">title<\/span> (' <span style=\"color: #008000;\">Hours studied vs. Exam Score<\/span> ')\nplt. <span style=\"color: #3366ff;\">xlabel<\/span> (' <span style=\"color: #008000;\">Hours<\/span> ')\nplt. <span style=\"color: #3366ff;\">ylabel<\/span> (' <span style=\"color: #008000;\">Score<\/span> ')\nplt. <span style=\"color: #3366ff;\">show<\/span> ()\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11539\" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simpleregpython1.png\" alt=\"Python \u4e2d\u7684\u70b9\u4e91\" width=\"421\" height=\"297\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u4ece\u56fe\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0c\u8fd9\u79cd\u5173\u7cfb\u4f3c\u4e4e\u662f\u7ebf\u6027\u7684\u3002\u968f\u7740<em>\u5c0f\u65f6\u6570\u7684<\/em>\u589e\u52a0\uff0c<em>\u5206\u6570<\/em>\u4e5f\u8d8b\u4e8e\u7ebf\u6027\u589e\u52a0\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u7bb1\u7ebf\u56fe\u6765\u53ef\u89c6\u5316\u8003\u8bd5\u7ed3\u679c\u7684\u5206\u5e03\u5e76\u68c0\u67e5<a href=\"https:\/\/statorials.org\/cn\/\u5220\u9664\u5f02\u5e38\u503c-python\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u5f02\u5e38\u503c<\/a>\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u5982\u679c\u67d0\u4e2a\u89c2\u6d4b\u503c\u662f\u7b2c\u4e09\u4e2a\u56db\u5206\u4f4d (Q3) \u4e0a\u65b9\u56db\u5206\u4f4d\u8ddd\u7684 1.5 \u500d\u6216\u7b2c\u4e00\u4e2a\u56db\u5206\u4f4d (Q1) \u4e0b\u65b9\u56db\u5206\u4f4d\u8ddd\u7684 1.5 \u500d\uff0c\u5219 Python \u5c06\u5176\u5b9a\u4e49\u4e3a\u79bb\u7fa4\u503c\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u5982\u679c\u89c2\u5bdf\u503c\u5f02\u5e38\uff0c\u7bb1\u7ebf\u56fe\u4e2d\u4f1a\u51fa\u73b0\u4e00\u4e2a\u5c0f\u5706\u5708\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong>df. <span style=\"color: #3366ff;\">boxplot<\/span> (column=[' <span style=\"color: #008000;\">score<\/span> '])<\/strong> <\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11540 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simpleregpython2.png\" alt=\"Python \u4e2d\u7684\u7bb1\u7ebf\u56fe\" width=\"374\" height=\"247\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u7bb1\u7ebf\u56fe\u4e2d\u6ca1\u6709\u5c0f\u5706\u5708\uff0c\u8fd9\u610f\u5473\u7740\u6211\u4eec\u7684\u6570\u636e\u96c6\u4e2d\u6ca1\u6709\u5f02\u5e38\u503c\u3002<\/span><\/p>\n<h3><span style=\"color: #000000;\"><b>\u6b65\u9aa4 3\uff1a\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52<\/b><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u4e00\u65e6\u6211\u4eec\u786e\u8ba4\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\u662f\u7ebf\u6027\u7684\u5e76\u4e14\u4e0d\u5b58\u5728\u5f02\u5e38\u503c\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u7ee7\u7eed\u4f7f\u7528<em>\u5c0f\u65f6<\/em>\u4f5c\u4e3a\u89e3\u91ca\u53d8\u91cf\u548c<em>\u5206\u6570<\/em>\u4f5c\u4e3a\u54cd\u5e94\u53d8\u91cf\u6765\u62df\u5408\u4e00\u4e2a\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u6a21\u578b\uff1a<\/span><\/p>\n<p><em><span style=\"color: #000000;\"><strong>\u6ce8\u610f\uff1a<\/strong>\u6211\u4eec\u5c06\u4f7f\u7528<\/span><span style=\"color: #000000;\">statsmodels \u5e93\u4e2d\u7684<\/span><a href=\"https:\/\/www.statsmodels.org\/devel\/generated\/statsmodels.regression.linear_model.OLS.html\" target=\"_blank\" rel=\"noopener noreferrer\">OLS() \u51fd\u6570<\/a>\u6765\u62df\u5408\u56de\u5f52\u6a21\u578b\u3002<\/em><\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008000;\">import<\/span> statsmodels.api <span style=\"color: #008000;\">as<\/span> sm\n\n<span style=\"color: #008080;\">#define response variable\n<\/span>y = df[' <span style=\"color: #008000;\">score<\/span> ']\n\n<span style=\"color: #008080;\">#define explanatory variable\n<\/span>x = df[[' <span style=\"color: #008000;\">hours<\/span> ']]\n\n<span style=\"color: #008080;\">#add constant to predictor variables\n<\/span>x = sm. <span style=\"color: #3366ff;\">add_constant<\/span> (x)\n\n<span style=\"color: #008080;\">#fit linear regression model\n<\/span>model = sm. <span style=\"color: #3366ff;\">OLS<\/span> (y,x). <span style=\"color: #3366ff;\">fit<\/span> ()\n\n<span style=\"color: #008080;\">#view model summary\n<\/span><span style=\"color: #008000;\">print<\/span> ( <span style=\"color: #3366ff;\">model.summary<\/span> ())\n\n                            OLS Regression Results                            \n==================================================== ============================\nDept. Variable: R-squared score: 0.831\nModel: OLS Adj. R-squared: 0.818\nMethod: Least Squares F-statistic: 63.91\nDate: Mon, 26 Oct 2020 Prob (F-statistic): 2.25e-06\nTime: 15:51:45 Log-Likelihood: -39,594\nNo. Observations: 15 AIC: 83.19\nDf Residuals: 13 BIC: 84.60\nModel: 1                                         \nCovariance Type: non-robust                                         \n==================================================== ============================\n                 coef std err t P&gt;|t| [0.025 0.975]\n-------------------------------------------------- ----------------------------\nconst 65.3340 2.106 31.023 0.000 60.784 69.884\nhours 1.9824 0.248 7.995 0.000 1.447 2.518\n==================================================== ============================\nOmnibus: 4,351 Durbin-Watson: 1,677\nProb(Omnibus): 0.114 Jarque-Bera (JB): 1.329\nSkew: 0.092 Prob(JB): 0.515\nKurtosis: 1.554 Cond. No. 19.2\n==================================================== ============================<\/strong><\/pre>\n<p><span style=\"color: #000000;\">\u4ece\u6a21\u578b\u603b\u7ed3\u4e2d\u6211\u4eec\u53ef\u4ee5\u770b\u51fa\uff0c\u62df\u5408\u7684\u56de\u5f52\u65b9\u7a0b\u4e3a\uff1a<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u5206\u6570 = 65.334 + 1.9824*\uff08\u5c0f\u65f6\uff09<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u8fd9\u610f\u5473\u7740\u6bcf\u591a\u5b66\u4e60\u4e00\u5c0f\u65f6\uff0c\u5e73\u5747\u8003\u8bd5\u6210\u7ee9\u5c31\u4f1a\u589e\u52a0<strong>1.9824<\/strong>\u5206\u3002\u539f\u59cb\u503c<strong>65,334<\/strong>\u544a\u8bc9\u6211\u4eec\u96f6\u5b66\u4e60\u65f6\u95f4\u7684\u5b66\u751f\u7684\u5e73\u5747\u9884\u671f\u8003\u8bd5\u6210\u7ee9\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u6211\u4eec\u8fd8\u53ef\u4ee5\u4f7f\u7528\u8fd9\u4e2a\u65b9\u7a0b\u6839\u636e\u5b66\u751f\u5b66\u4e60\u7684\u5c0f\u65f6\u6570\u627e\u5230\u9884\u671f\u7684\u8003\u8bd5\u6210\u7ee9\u3002\u4f8b\u5982\uff0c\u5b66\u4e60 10 \u5c0f\u65f6\u7684\u5b66\u751f\u5e94\u83b7\u5f97<strong>85.158<\/strong>\u7684\u8003\u8bd5\u6210\u7ee9\uff1a<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u5206\u6570 = 65.334 + 1.9824*(10) = 85.158<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">\u4ee5\u4e0b\u662f\u5982\u4f55\u89e3\u91ca\u6a21\u578b\u6458\u8981\u7684\u5176\u4f59\u90e8\u5206\uff1a<\/span><\/p>\n<ul>\n<li> <span style=\"color: #000000;\"><strong>P&gt;|t| \uff1a<\/strong>\u8fd9\u662f\u4e0e\u6a21\u578b\u7cfb\u6570\u76f8\u5173\u7684 p \u503c\u3002\u7531\u4e8e<em>\u5c0f\u65f6<\/em>\u6570\u7684 p \u503c (0.000) \u663e\u7740\u5c0f\u4e8e 0.05\uff0c\u56e0\u6b64\u6211\u4eec\u53ef\u4ee5\u8bf4<em>\u5c0f\u65f6\u6570<\/em>\u548c<em>\u5206\u6570<\/em>\u4e4b\u95f4\u5b58\u5728\u7edf\u8ba1\u4e0a\u663e\u7740\u7684\u5173\u8054\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>R \u5e73\u65b9\uff1a<\/strong>\u8fd9\u4e2a\u6570\u5b57\u544a\u8bc9\u6211\u4eec\uff0c\u8003\u8bd5\u6210\u7ee9\u7684\u53d8\u5316\u767e\u5206\u6bd4\u53ef\u4ee5\u7528\u5b66\u4e60\u7684\u5c0f\u65f6\u6570\u6765\u89e3\u91ca\u3002\u4e00\u822c\u6765\u8bf4\uff0c\u56de\u5f52\u6a21\u578b\u7684 R \u5e73\u65b9\u503c\u8d8a\u5927\uff0c\u89e3\u91ca\u53d8\u91cf\u8d8a\u80fd\u9884\u6d4b\u54cd\u5e94\u53d8\u91cf\u7684\u503c\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c <strong>83.1%<\/strong>\u7684\u5206\u6570\u5dee\u5f02\u53ef\u4ee5\u7528\u5b66\u4e60\u65f6\u95f4\u6765\u89e3\u91ca\u3002<\/span><\/li>\n<li> <span style=\"color: #000000;\"><strong>F \u7edf\u8ba1\u91cf\u548c p \u503c\uff1a<\/strong> F \u7edf\u8ba1\u91cf ( <strong>63.91<\/strong> ) \u548c\u76f8\u5e94\u7684 p \u503c ( <strong>2.25e-06<\/strong> ) \u544a\u8bc9\u6211\u4eec\u56de\u5f52\u6a21\u578b\u7684\u6574\u4f53\u663e\u7740\u6027\uff0c\u5373\u6a21\u578b\u4e2d\u7684\u89e3\u91ca\u53d8\u91cf\u662f\u5426\u6709\u52a9\u4e8e\u89e3\u91ca\u53d8\u5f02\u3002\u5728\u54cd\u5e94\u53d8\u91cf\u4e2d\u3002\u7531\u4e8e\u6b64\u793a\u4f8b\u4e2d\u7684 p \u503c\u5c0f\u4e8e 0.05\uff0c\u56e0\u6b64\u6211\u4eec\u7684\u6a21\u578b\u5177\u6709\u7edf\u8ba1\u663e\u7740\u6027\uff0c\u5e76\u4e14<em>\u5c0f\u65f6\u6570<\/em>\u88ab\u8ba4\u4e3a\u6709\u52a9\u4e8e\u89e3\u91ca<em>\u5206\u6570<\/em>\u53d8\u5316\u3002<\/span><\/li>\n<\/ul>\n<h3><span style=\"color: #000000;\"><strong>\u7b2c 4 \u6b65\uff1a\u521b\u5efa\u6b8b\u5dee\u56fe<\/strong><\/span><\/h3>\n<p><span style=\"color: #000000;\">\u5c06\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u62df\u5408\u5230\u6570\u636e\u540e\uff0c\u6700\u540e\u4e00\u6b65\u662f\u521b\u5efa\u6b8b\u5dee\u56fe\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7ebf\u6027\u56de\u5f52\u7684\u5173\u952e\u5047\u8bbe\u4e4b\u4e00\u662f\u56de\u5f52\u6a21\u578b\u7684\u6b8b\u5dee\u8fd1\u4f3c\u6b63\u6001\u5206\u5e03\uff0c\u5e76\u4e14\u5728\u89e3\u91ca\u53d8\u91cf\u7684\u6bcf\u4e2a\u6c34\u5e73\u4e0a\u90fd\u662f<a href=\"https:\/\/statorials.org\/cn\/\u5f02\u65b9\u5dee\u56de\u5f52\/\" target=\"_blank\" rel=\"noopener noreferrer\">\u540c\u65b9\u5dee\u7684<\/a>\u3002\u5982\u679c\u4e0d\u6ee1\u8db3\u8fd9\u4e9b\u5047\u8bbe\uff0c\u6211\u4eec\u7684\u56de\u5f52\u6a21\u578b\u7684\u7ed3\u679c\u53ef\u80fd\u4f1a\u4ea7\u751f\u8bef\u5bfc\u6216\u4e0d\u53ef\u9760\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u4e3a\u4e86\u9a8c\u8bc1\u662f\u5426\u6ee1\u8db3\u8fd9\u4e9b\u5047\u8bbe\uff0c\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u4ee5\u4e0b\u6b8b\u5dee\u56fe\uff1a<\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>\u6b8b\u5dee\u4e0e\u62df\u5408\u503c\u56fe\uff1a<\/strong>\u8be5\u56fe\u5bf9\u4e8e\u786e\u8ba4\u540c\u65b9\u5dee\u6027\u5f88\u6709\u7528\u3002 x \u8f74\u663e\u793a\u62df\u5408\u503c\uff0cy \u8f74\u663e\u793a\u6b8b\u5dee\u3002\u53ea\u8981\u6b8b\u5dee\u770b\u8d77\u6765\u5728\u96f6\u503c\u5468\u56f4\u968f\u673a\u4e14\u5747\u5300\u5730\u5206\u5e03\u5728\u6574\u4e2a\u56fe\u4e2d\uff0c\u6211\u4eec\u5c31\u53ef\u4ee5\u5047\u8bbe\u4e0d\u8fdd\u53cd\u540c\u65b9\u5dee\u6027\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define figure size\n<\/span>fig = plt. <span style=\"color: #3366ff;\">figure<\/span> (figsize=(12.8))\n\n<span style=\"color: #008080;\">#produce residual plots\n<\/span>fig = sm.graphics. <span style=\"color: #3366ff;\">plot_regress_exog<\/span> (model, ' <span style=\"color: #008000;\">hours<\/span> ', fig=fig)\n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11541 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simpleregpython3.png\" alt=\"Python \u4e2d\u7684\u6b8b\u5dee\u56fe\" width=\"665\" height=\"442\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u4ea7\u751f\u4e86\u56db\u4e2a\u5730\u5757\u3002\u53f3\u4e0a\u89d2\u7684\u662f\u6b8b\u5dee\u56fe\u4e0e\u8c03\u6574\u540e\u7684\u56fe\u3002\u8be5\u56fe\u4e0a\u7684 x \u8f74\u663e\u793a\u9884\u6d4b\u53d8\u91cf<em>\u70b9<\/em>\u7684\u5b9e\u9645\u503c\uff0cy \u8f74\u663e\u793a\u8be5\u503c\u7684\u6b8b\u5dee\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7531\u4e8e\u6b8b\u5dee\u4f3c\u4e4e\u968f\u673a\u5206\u6563\u5728\u96f6\u9644\u8fd1\uff0c\u8fd9\u8868\u660e\u5f02\u65b9\u5dee\u6027\u4e0d\u662f\u89e3\u91ca\u53d8\u91cf\u7684\u95ee\u9898\u3002<\/span><\/p>\n<p> <span style=\"color: #000000;\"><strong>QQ \u56fe\uff1a<\/strong>\u8be5\u56fe\u53ef\u7528\u4e8e\u786e\u5b9a\u6b8b\u5dee\u662f\u5426\u670d\u4ece\u6b63\u6001\u5206\u5e03\u3002\u5982\u679c\u56fe\u4e2d\u7684\u6570\u636e\u503c\u5927\u81f4\u5448 45 \u5ea6\u89d2\u76f4\u7ebf\u5206\u5e03\uff0c\u5219\u6570\u636e\u5448\u6b63\u6001\u5206\u5e03\uff1a<\/span> <\/p>\n<pre style=\"background-color: #ececec; font-size: 15px;\"> <strong><span style=\"color: #008080;\">#define residuals\n<\/span>res = model. <span style=\"color: #3366ff;\">reside<\/span>\n\n<span style=\"color: #008080;\">#create QQ plot\n<\/span>fig = sm. <span style=\"color: #3366ff;\">qqplot<\/span> (res, fit= <span style=\"color: #008000;\">True<\/span> , line=\" <span style=\"color: #008000;\">45<\/span> \")\nplt.show() \n<\/strong><\/pre>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-11542 \" src=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simpleregpython4.png\" alt=\"Python \u4e2d\u7684 QQ \u7ed8\u56fe\" width=\"415\" height=\"277\" srcset=\"\" sizes=\"auto, \"><\/p>\n<p><span style=\"color: #000000;\">\u6b8b\u5dee\u7a0d\u5fae\u504f\u79bb 45 \u5ea6\u7ebf\uff0c\u4f46\u4e0d\u8db3\u4ee5\u5f15\u8d77\u4e25\u91cd\u5173\u6ce8\u3002\u6211\u4eec\u53ef\u4ee5\u5047\u8bbe\u6ee1\u8db3\u6b63\u6001\u6027\u5047\u8bbe\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\">\u7531\u4e8e\u6b8b\u5dee\u5448\u6b63\u6001\u5206\u5e03\u4e14\u540c\u65b9\u5dee\uff0c\u6211\u4eec\u9a8c\u8bc1\u4e86\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u5047\u8bbe\u5f97\u5230\u6ee1\u8db3\u3002\u56e0\u6b64\uff0c\u6211\u4eec\u6a21\u578b\u7684\u8f93\u51fa\u662f\u53ef\u9760\u7684\u3002<\/span><\/p>\n<p><span style=\"color: #000000;\"><em>\u672c\u6559\u7a0b\u4e2d\u4f7f\u7528\u7684\u5b8c\u6574 Python \u4ee3\u7801\u53ef\u4ee5<a href=\"https:\/\/github.com\/Statorials\/Python-Guides\/blob\/main\/simple_linear_regression.py\" target=\"_blank\" rel=\"noopener noreferrer\">\u5728\u6b64\u5904<\/a>\u627e\u5230\u3002<\/em><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u662f\u4e00\u79cd\u6211\u4eec\u53ef\u4ee5\u7528\u6765\u7406\u89e3\u5355\u4e2a\u89e3\u91ca\u53d8\u91cf\u548c\u5355\u4e2a\u54cd\u5e94\u53d8\u91cf\u4e4b\u95f4\u5173\u7cfb\u7684\u6280\u672f\u3002 \u8be5\u6280\u672f\u627e\u5230\u4e00\u6761\u6700\u201c\u9002\u5408\u201d\u6570\u636e\u7684\u7ebf [&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-1152","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\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09<\/title>\n<meta name=\"description\" content=\"\u672c\u6559\u7a0b\u901a\u8fc7\u5206\u6b65\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\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\u7b80\u5355\u7ebf\u6027\u56de\u5f52\/\" \/>\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\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09\" \/>\n<meta property=\"og:description\" content=\"\u672c\u6559\u7a0b\u901a\u8fc7\u5206\u6b65\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/statorials.org\/cn\/python-\u4e2d\u7684\u7b80\u5355\u7ebf\u6027\u56de\u5f52\/\" \/>\n<meta property=\"og:site_name\" content=\"Statorials\" \/>\n<meta property=\"article:published_time\" content=\"2023-07-27T12:04:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simpleregpython1.png\" \/>\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%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/\",\"url\":\"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/\",\"name\":\"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09\",\"isPartOf\":{\"@id\":\"https:\/\/statorials.org\/cn\/#website\"},\"datePublished\":\"2023-07-27T12:04:19+00:00\",\"dateModified\":\"2023-07-27T12:04:19+00:00\",\"author\":{\"@id\":\"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261\"},\"description\":\"\u672c\u6559\u7a0b\u901a\u8fc7\u5206\u6b65\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/statorials.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5982\u4f55\u5728 python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09\"}]},{\"@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\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09","description":"\u672c\u6559\u7a0b\u901a\u8fc7\u5206\u6b65\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\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\u7b80\u5355\u7ebf\u6027\u56de\u5f52\/","og_locale":"zh_CN","og_type":"article","og_title":"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09","og_description":"\u672c\u6559\u7a0b\u901a\u8fc7\u5206\u6b65\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u3002","og_url":"https:\/\/statorials.org\/cn\/python-\u4e2d\u7684\u7b80\u5355\u7ebf\u6027\u56de\u5f52\/","og_site_name":"Statorials","article_published_time":"2023-07-27T12:04:19+00:00","og_image":[{"url":"https:\/\/statorials.org\/wp-content\/uploads\/2023\/08\/simpleregpython1.png"}],"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%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/","url":"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/","name":"\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09","isPartOf":{"@id":"https:\/\/statorials.org\/cn\/#website"},"datePublished":"2023-07-27T12:04:19+00:00","dateModified":"2023-07-27T12:04:19+00:00","author":{"@id":"https:\/\/statorials.org\/cn\/#\/schema\/person\/124e4e5b7c9f8dc0f1f95cc8c1db3261"},"description":"\u672c\u6559\u7a0b\u901a\u8fc7\u5206\u6b65\u793a\u4f8b\u89e3\u91ca\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\u3002","breadcrumb":{"@id":"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/statorials.org\/cn\/python-%e4%b8%ad%e7%9a%84%e7%ae%80%e5%8d%95%e7%ba%bf%e6%80%a7%e5%9b%9e%e5%bd%92\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/statorials.org\/cn\/"},{"@type":"ListItem","position":2,"name":"\u5982\u4f55\u5728 python \u4e2d\u6267\u884c\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff08\u9010\u6b65\uff09"}]},{"@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\/1152","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=1152"}],"version-history":[{"count":0,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/posts\/1152\/revisions"}],"wp:attachment":[{"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/media?parent=1152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/categories?post=1152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/statorials.org\/cn\/wp-json\/wp\/v2\/tags?post=1152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}