{"id":1038167,"date":"2024-12-31T12:21:31","date_gmt":"2024-12-31T04:21:31","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1038167.html"},"modified":"2024-12-31T12:21:34","modified_gmt":"2024-12-31T04:21:34","slug":"python%e5%a6%82%e4%bd%95%e6%a3%80%e9%aa%8c%e8%af%af%e5%b7%ae%e6%96%b9%e5%b7%ae%e9%bd%90%e6%80%a7","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1038167.html","title":{"rendered":"python\u5982\u4f55\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-docs.pingcode.com\/wp-content\/uploads\/2024\/12\/664d6cd8-f6a7-4f7a-a1a7-fe845c19ad10.webp?x-oss-process=image\/auto-orient,1\/format,webp\" alt=\"python\u5982\u4f55\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\" \/><\/p>\n<p><p> <strong>Python\u4e2d\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u4f7f\u7528\u7edf\u8ba1\u68c0\u9a8c\u3001\u56fe\u5f62\u5206\u6790\u3001\u6a21\u578b\u8bca\u65ad\u7b49\u65b9\u6cd5\uff0c\u5176\u4e2d\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ecLevene\u68c0\u9a8c\u3001Bartlett\u68c0\u9a8c\u3001\u56fe\u5f62\u5206\u6790\u7b49\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecdLevene\u68c0\u9a8c\u3002<\/strong><\/p>\n<\/p>\n<p><p>Levene\u68c0\u9a8c\u662f\u4e00\u4e2a\u5e38\u7528\u7684\u65b9\u6cd5\uff0c\u7528\u4e8e\u68c0\u9a8c\u4e0d\u540c\u6837\u672c\u7ec4\u7684\u8bef\u5dee\u65b9\u5dee\u662f\u5426\u9f50\u6027\u3002Levene\u68c0\u9a8c\u7684\u539f\u7406\u662f\u6bd4\u8f83\u5404\u7ec4\u6570\u636e\u504f\u79bb\u5176\u5747\u503c\u6216\u4e2d\u4f4d\u6570\u7684\u7edd\u5bf9\u504f\u5dee\uff0c\u6765\u5224\u65ad\u65b9\u5dee\u662f\u5426\u76f8\u7b49\u3002Python\u4e2d\u53ef\u4ee5\u4f7f\u7528<code>scipy.stats<\/code>\u6a21\u5757\u4e2d\u7684<code>levene<\/code>\u51fd\u6570\u6765\u8fdb\u884cLevene\u68c0\u9a8c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001Levene\u68c0\u9a8c<\/h3>\n<\/p>\n<p><p>Levene\u68c0\u9a8c\u662f\u68c0\u9a8c\u65b9\u5dee\u9f50\u6027\u7684\u5e38\u7528\u65b9\u6cd5\uff0c\u5176\u5047\u8bbe\u662f\u5404\u7ec4\u6570\u636e\u7684\u65b9\u5dee\u76f8\u7b49\uff0c\u5373\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u3002\u5982\u679c\u68c0\u9a8c\u7ed3\u679c\u7684p\u503c\u5927\u4e8e\u663e\u8457\u6027\u6c34\u5e73\uff08\u901a\u5e38\u4e3a0.05\uff09\uff0c\u5219\u4e0d\u80fd\u62d2\u7edd\u65b9\u5dee\u9f50\u6027\u7684\u5047\u8bbe\uff1b\u5982\u679cp\u503c\u5c0f\u4e8e\u663e\u8457\u6027\u6c34\u5e73\uff0c\u5219\u62d2\u7edd\u65b9\u5dee\u9f50\u6027\u7684\u5047\u8bbe\u3002<\/p>\n<\/p>\n<p><h4>1. \u4ee3\u7801\u793a\u4f8b<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>from scipy import stats<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>group1 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>group2 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>group3 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<h2><strong>\u8fdb\u884cLevene\u68c0\u9a8c<\/strong><\/h2>\n<p>stat, p_value = stats.levene(group1, group2, group3)<\/p>\n<p>print(&#39;Levene\u68c0\u9a8c\u7edf\u8ba1\u91cf:&#39;, stat)<\/p>\n<p>print(&#39;p\u503c:&#39;, p_value)<\/p>\n<h2><strong>\u7ed3\u679c\u89e3\u91ca<\/strong><\/h2>\n<p>if p_value &gt; 0.05:<\/p>\n<p>    print(&#39;\u4e0d\u80fd\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5404\u7ec4\u6570\u636e\u65b9\u5dee\u9f50\u6027&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5404\u7ec4\u6570\u636e\u65b9\u5dee\u4e0d\u9f50\u6027&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u751f\u6210\u4e86\u4e09\u7ec4\u6b63\u6001\u5206\u5e03\u7684\u6570\u636e\uff0c\u5e76\u4f7f\u7528Levene\u68c0\u9a8c\u6765\u68c0\u9a8c\u5b83\u4eec\u7684\u65b9\u5dee\u9f50\u6027\u3002\u68c0\u9a8c\u7ed3\u679c\u663e\u793aLevene\u68c0\u9a8c\u7edf\u8ba1\u91cf\u548cp\u503c\uff0c\u5e76\u6839\u636ep\u503c\u5224\u65ad\u662f\u5426\u62d2\u7edd\u65b9\u5dee\u9f50\u6027\u7684\u539f\u5047\u8bbe\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001Bartlett\u68c0\u9a8c<\/h3>\n<\/p>\n<p><p>Bartlett\u68c0\u9a8c\u4e5f\u662f\u68c0\u9a8c\u65b9\u5dee\u9f50\u6027\u7684\u5e38\u7528\u65b9\u6cd5\uff0c\u5176\u5047\u8bbe\u662f\u5404\u7ec4\u6570\u636e\u7684\u65b9\u5dee\u76f8\u7b49\u3002\u4e0eLevene\u68c0\u9a8c\u4e0d\u540c\u7684\u662f\uff0cBartlett\u68c0\u9a8c\u5bf9\u6570\u636e\u7684\u6b63\u6001\u6027\u8981\u6c42\u8f83\u9ad8\uff0c\u56e0\u6b64\u5728\u6570\u636e\u4e0d\u6ee1\u8db3\u6b63\u6001\u6027\u5047\u8bbe\u65f6\u53ef\u80fd\u4f1a\u5931\u6548\u3002<\/p>\n<\/p>\n<p><h4>1. \u4ee3\u7801\u793a\u4f8b<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>from scipy import stats<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>group1 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>group2 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>group3 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<h2><strong>\u8fdb\u884cBartlett\u68c0\u9a8c<\/strong><\/h2>\n<p>stat, p_value = stats.bartlett(group1, group2, group3)<\/p>\n<p>print(&#39;Bartlett\u68c0\u9a8c\u7edf\u8ba1\u91cf:&#39;, stat)<\/p>\n<p>print(&#39;p\u503c:&#39;, p_value)<\/p>\n<h2><strong>\u7ed3\u679c\u89e3\u91ca<\/strong><\/h2>\n<p>if p_value &gt; 0.05:<\/p>\n<p>    print(&#39;\u4e0d\u80fd\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5404\u7ec4\u6570\u636e\u65b9\u5dee\u9f50\u6027&#39;)<\/p>\n<p>else:<\/p>\n<p>    print(&#39;\u62d2\u7edd\u539f\u5047\u8bbe\uff0c\u5404\u7ec4\u6570\u636e\u65b9\u5dee\u4e0d\u9f50\u6027&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e0eLevene\u68c0\u9a8c\u7c7b\u4f3c\uff0c\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\u6211\u4eec\u751f\u6210\u4e86\u4e09\u7ec4\u6b63\u6001\u5206\u5e03\u7684\u6570\u636e\uff0c\u5e76\u4f7f\u7528Bartlett\u68c0\u9a8c\u6765\u68c0\u9a8c\u5b83\u4eec\u7684\u65b9\u5dee\u9f50\u6027\u3002\u68c0\u9a8c\u7ed3\u679c\u663e\u793aBartlett\u68c0\u9a8c\u7edf\u8ba1\u91cf\u548cp\u503c\uff0c\u5e76\u6839\u636ep\u503c\u5224\u65ad\u662f\u5426\u62d2\u7edd\u65b9\u5dee\u9f50\u6027\u7684\u539f\u5047\u8bbe\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u56fe\u5f62\u5206\u6790<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4f7f\u7528\u7edf\u8ba1\u68c0\u9a8c\u65b9\u6cd5\u5916\uff0c\u8fd8\u53ef\u4ee5\u901a\u8fc7\u56fe\u5f62\u5206\u6790\u6765\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u7ed8\u5236\u6b8b\u5dee\u56fe\u6216\u7bb1\u7ebf\u56fe\u6765\u89c2\u5bdf\u4e0d\u540c\u7ec4\u6570\u636e\u7684\u65b9\u5dee\u662f\u5426\u76f8\u7b49\u3002<\/p>\n<\/p>\n<p><h4>1. \u6b8b\u5dee\u56fe<\/h4>\n<\/p>\n<p><p>\u6b8b\u5dee\u56fe\u662f\u4e00\u79cd\u5e38\u7528\u7684\u56fe\u5f62\u5206\u6790\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u6765\u89c2\u5bdf\u8bef\u5dee\u7684\u5206\u5e03\u60c5\u51b5\u3002\u901a\u8fc7\u7ed8\u5236\u6b8b\u5dee\u4e0e\u9884\u6d4b\u503c\u6216\u81ea\u53d8\u91cf\u4e4b\u95f4\u7684\u5173\u7cfb\uff0c\u53ef\u4ee5\u76f4\u89c2\u5730\u89c2\u5bdf\u8bef\u5dee\u65b9\u5dee\u662f\u5426\u9f50\u6027\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>from sklearn.linear_model import LinearRegression<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>X = np.random.normal(loc=0, scale=1, size=100).reshape(-1, 1)<\/p>\n<p>y = 3 * X.flatten() + np.random.normal(loc=0, scale=1, size=100)<\/p>\n<h2><strong>\u8fdb\u884c\u7ebf\u6027\u56de\u5f52<\/strong><\/h2>\n<p>model = LinearRegression()<\/p>\n<p>model.fit(X, y)<\/p>\n<p>y_pred = model.predict(X)<\/p>\n<p>residuals = y - y_pred<\/p>\n<h2><strong>\u7ed8\u5236\u6b8b\u5dee\u56fe<\/strong><\/h2>\n<p>plt.scatter(y_pred, residuals)<\/p>\n<p>plt.axhline(0, color=&#39;red&#39;, linestyle=&#39;--&#39;)<\/p>\n<p>plt.xlabel(&#39;\u9884\u6d4b\u503c&#39;)<\/p>\n<p>plt.ylabel(&#39;\u6b8b\u5dee&#39;)<\/p>\n<p>plt.title(&#39;\u6b8b\u5dee\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u751f\u6210\u4e86\u4e00\u4e2a\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u6570\u636e\uff0c\u5e76\u7ed8\u5236\u4e86\u6b8b\u5dee\u56fe\u3002\u901a\u8fc7\u89c2\u5bdf\u6b8b\u5dee\u56fe\uff0c\u53ef\u4ee5\u5224\u65ad\u8bef\u5dee\u65b9\u5dee\u662f\u5426\u9f50\u6027\u3002\u5982\u679c\u6b8b\u5dee\u5728\u9884\u6d4b\u503c\u7684\u5404\u4e2a\u8303\u56f4\u5185\u968f\u673a\u5206\u5e03\u4e14\u6ca1\u6709\u660e\u663e\u7684\u6a21\u5f0f\uff0c\u5219\u8bef\u5dee\u65b9\u5dee\u662f\u9f50\u6027\u7684\u3002<\/p>\n<\/p>\n<p><h4>2. \u7bb1\u7ebf\u56fe<\/h4>\n<\/p>\n<p><p>\u7bb1\u7ebf\u56fe\u662f\u4e00\u79cd\u5e38\u7528\u7684\u56fe\u5f62\u5206\u6790\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u6765\u89c2\u5bdf\u4e0d\u540c\u7ec4\u6570\u636e\u7684\u5206\u5e03\u60c5\u51b5\u3002\u901a\u8fc7\u7ed8\u5236\u4e0d\u540c\u7ec4\u6570\u636e\u7684\u7bb1\u7ebf\u56fe\uff0c\u53ef\u4ee5\u76f4\u89c2\u5730\u89c2\u5bdf\u5404\u7ec4\u6570\u636e\u7684\u65b9\u5dee\u662f\u5426\u76f8\u7b49\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>group1 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>group2 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>group3 = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<h2><strong>\u7ed8\u5236\u7bb1\u7ebf\u56fe<\/strong><\/h2>\n<p>data = [group1, group2, group3]<\/p>\n<p>plt.boxplot(data, labels=[&#39;\u7ec41&#39;, &#39;\u7ec42&#39;, &#39;\u7ec43&#39;])<\/p>\n<p>plt.xlabel(&#39;\u7ec4\u522b&#39;)<\/p>\n<p>plt.ylabel(&#39;\u6570\u636e\u503c&#39;)<\/p>\n<p>plt.title(&#39;\u7bb1\u7ebf\u56fe&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u751f\u6210\u4e86\u4e09\u7ec4\u6b63\u6001\u5206\u5e03\u7684\u6570\u636e\uff0c\u5e76\u7ed8\u5236\u4e86\u5b83\u4eec\u7684\u7bb1\u7ebf\u56fe\u3002\u901a\u8fc7\u89c2\u5bdf\u7bb1\u7ebf\u56fe\uff0c\u53ef\u4ee5\u5224\u65ad\u5404\u7ec4\u6570\u636e\u7684\u65b9\u5dee\u662f\u5426\u76f8\u7b49\u3002\u5982\u679c\u5404\u7ec4\u6570\u636e\u7684\u7bb1\u4f53\u9ad8\u5ea6\u76f8\u4f3c\uff0c\u5219\u65b9\u5dee\u662f\u9f50\u6027\u7684\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u6a21\u578b\u8bca\u65ad<\/h3>\n<\/p>\n<p><p>\u5728\u5efa\u6a21\u8fc7\u7a0b\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6a21\u578b\u8bca\u65ad\u6765\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u4f7f\u7528\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\uff08GLM\uff09\u4e2d\u7684\u8bca\u65ad\u65b9\u6cd5\u6765\u68c0\u67e5\u8bef\u5dee\u65b9\u5dee\u662f\u5426\u9f50\u6027\u3002<\/p>\n<\/p>\n<p><h4>1. \u4ee3\u7801\u793a\u4f8b<\/h4>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import statsmodels.api as sm<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>X = np.random.normal(loc=0, scale=1, size=100)<\/p>\n<p>y = 3 * X + np.random.normal(loc=0, scale=1, size=100)<\/p>\n<h2><strong>\u8fdb\u884c\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\u62df\u5408<\/strong><\/h2>\n<p>X = sm.add_constant(X)<\/p>\n<p>model = sm.OLS(y, X).fit()<\/p>\n<h2><strong>\u7ed8\u5236\u6a21\u578b\u8bca\u65ad\u56fe<\/strong><\/h2>\n<p>sm.graphics.plot_regress_exog(model, &#39;x1&#39;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u4e0a\u8ff0\u4ee3\u7801\u4e2d\uff0c\u6211\u4eec\u751f\u6210\u4e86\u4e00\u4e2a\u7b80\u5355\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u6570\u636e\uff0c\u5e76\u4f7f\u7528\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\uff08GLM\uff09\u62df\u5408\u6570\u636e\u3002\u901a\u8fc7\u7ed8\u5236\u6a21\u578b\u8bca\u65ad\u56fe\uff0c\u53ef\u4ee5\u68c0\u67e5\u8bef\u5dee\u65b9\u5dee\u662f\u5426\u9f50\u6027\u3002\u5982\u679c\u6a21\u578b\u8bca\u65ad\u56fe\u4e2d\u6b8b\u5dee\u7684\u5206\u5e03\u6ca1\u6709\u660e\u663e\u7684\u6a21\u5f0f\u4e14\u65b9\u5dee\u662f\u6052\u5b9a\u7684\uff0c\u5219\u8bef\u5dee\u65b9\u5dee\u662f\u9f50\u6027\u7684\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728Python\u4e2d\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ecLevene\u68c0\u9a8c\u3001Bartlett\u68c0\u9a8c\u3001\u56fe\u5f62\u5206\u6790\u548c\u6a21\u578b\u8bca\u65ad\u7b49\u3002Levene\u68c0\u9a8c\u548cBartlett\u68c0\u9a8c\u662f\u5e38\u7528\u7684\u7edf\u8ba1\u68c0\u9a8c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u901a\u8fc7<code>scipy.stats<\/code>\u6a21\u5757\u4e2d\u7684\u51fd\u6570\u8fdb\u884c\u68c0\u9a8c\u3002\u56fe\u5f62\u5206\u6790\u65b9\u6cd5\u5982\u6b8b\u5dee\u56fe\u548c\u7bb1\u7ebf\u56fe\u53ef\u4ee5\u76f4\u89c2\u5730\u89c2\u5bdf\u6570\u636e\u7684\u65b9\u5dee\u662f\u5426\u76f8\u7b49\u3002\u6a21\u578b\u8bca\u65ad\u65b9\u6cd5\u5982\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\u4e2d\u7684\u8bca\u65ad\u56fe\u53ef\u4ee5\u5e2e\u52a9\u68c0\u67e5\u8bef\u5dee\u65b9\u5dee\u662f\u5426\u9f50\u6027\u3002\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u53ef\u4ee5\u6839\u636e\u6570\u636e\u7684\u7279\u70b9\u548c\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u8fdb\u884c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u7684\u68c0\u9a8c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u68c0\u67e5\u6570\u636e\u7684\u65b9\u5dee\u9f50\u6027\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7edf\u8ba1\u5e93\u6765\u68c0\u9a8c\u6570\u636e\u7684\u65b9\u5dee\u9f50\u6027\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ecLevene\u68c0\u9a8c\u548cBartlett\u68c0\u9a8c\u3002\u901a\u8fc7\u4f7f\u7528<code>scipy.stats<\/code>\u6a21\u5757\u4e2d\u7684<code>levene<\/code>\u6216<code>bartlett<\/code>\u51fd\u6570\uff0c\u53ef\u4ee5\u8f7b\u677e\u8fdb\u884c\u65b9\u5dee\u9f50\u6027\u68c0\u9a8c\u3002\u786e\u4fdd\u5728\u4f7f\u7528\u8fd9\u4e9b\u51fd\u6570\u4e4b\u524d\uff0c\u6570\u636e\u5df2\u88ab\u9002\u5f53\u7ec4\u7ec7\u4e3a\u7ec4\u522b\u3002<\/p>\n<p><strong>\u5728\u8fdb\u884c\u65b9\u5dee\u9f50\u6027\u68c0\u9a8c\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u5047\u8bbe\uff1f<\/strong><br \/>\u65b9\u5dee\u9f50\u6027\u68c0\u9a8c\u901a\u5e38\u6d89\u53ca\u4e24\u4e2a\u4e3b\u8981\u5047\u8bbe\uff1a\u96f6\u5047\u8bbe\uff08H0\uff09\u8868\u793a\u5404\u7ec4\u7684\u65b9\u5dee\u76f8\u7b49\uff0c\u800c\u5907\u62e9\u5047\u8bbe\uff08H1\uff09\u5219\u8868\u793a\u81f3\u5c11\u6709\u4e00\u7ec4\u7684\u65b9\u5dee\u4e0d\u540c\u3002\u5728\u8fdb\u884c\u68c0\u9a8c\u65f6\uff0c\u7ed3\u679c\u7684p\u503c\u5c06\u5e2e\u52a9\u5224\u65ad\u662f\u5426\u62d2\u7edd\u96f6\u5047\u8bbe\u3002p\u503c\u4f4e\u4e8e\u663e\u8457\u6027\u6c34\u5e73\uff08\u59820.05\uff09\u901a\u5e38\u610f\u5473\u7740\u65b9\u5dee\u4e0d\u9f50\u3002<\/p>\n<p><strong>\u5982\u4f55\u5904\u7406\u65b9\u5dee\u4e0d\u9f50\u7684\u60c5\u51b5\uff1f<\/strong><br \/>\u5f53\u65b9\u5dee\u4e0d\u9f50\u65f6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u6570\u636e\u8f6c\u6362\u65b9\u6cd5\uff0c\u4f8b\u5982\u5bf9\u6570\u53d8\u6362\u6216\u5e73\u65b9\u6839\u53d8\u6362\uff0c\u6765\u5c1d\u8bd5\u4f7f\u6570\u636e\u66f4\u7b26\u5408\u65b9\u5dee\u9f50\u6027\u7684\u8981\u6c42\u3002\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u91c7\u7528\u7a33\u5065\u7edf\u8ba1\u65b9\u6cd5\uff0c\u5982Welch\u7684t\u68c0\u9a8c\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u4e0d\u4f9d\u8d56\u4e8e\u65b9\u5dee\u9f50\u6027\u7684\u5047\u8bbe\uff0c\u4ece\u800c\u63d0\u9ad8\u5206\u6790\u7684\u53ef\u9760\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u4e2d\u68c0\u9a8c\u8bef\u5dee\u65b9\u5dee\u9f50\u6027\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u53ef\u4ee5\u4f7f\u7528\u7edf\u8ba1\u68c0\u9a8c\u3001\u56fe\u5f62\u5206\u6790\u3001\u6a21\u578b\u8bca\u65ad\u7b49\u65b9\u6cd5\uff0c\u5176\u4e2d\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ecLe [&hellip;]","protected":false},"author":3,"featured_media":1038186,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1038167"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=1038167"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1038167\/revisions"}],"predecessor-version":[{"id":1038190,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1038167\/revisions\/1038190"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1038186"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1038167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1038167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1038167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}