{"id":1167642,"date":"2025-01-15T15:47:43","date_gmt":"2025-01-15T07:47:43","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1167642.html"},"modified":"2025-01-15T15:47:43","modified_gmt":"2025-01-15T07:47:43","slug":"python%e5%a6%82%e4%bd%95%e5%a4%84%e7%90%86%e6%9e%81%e7%ab%af%e5%80%bc","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1167642.html","title":{"rendered":"python\u5982\u4f55\u5904\u7406\u6781\u7aef\u503c"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25211454\/818a9fa9-d4cc-4cdf-a6d8-9ada7b678936.webp\" alt=\"python\u5982\u4f55\u5904\u7406\u6781\u7aef\u503c\" \/><\/p>\n<p><p> <strong>Python\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u7edf\u8ba1\u65b9\u6cd5\u3001\u7bb1\u7ebf\u56fe\u6cd5\u3001Z-score\u65b9\u6cd5\u3001IQR\u65b9\u6cd5\u7b49\u3002<\/strong>\u5176\u4e2d\uff0c<strong>\u7edf\u8ba1\u65b9\u6cd5<\/strong>\u662f\u6700\u5e38\u89c1\u7684\u4e00\u79cd\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\u3002\u901a\u8fc7\u8ba1\u7b97\u6570\u636e\u7684\u5747\u503c\u548c\u6807\u51c6\u5dee\uff0c\u53ef\u4ee5\u5224\u65ad\u6570\u636e\u662f\u5426\u5c5e\u4e8e\u6781\u7aef\u503c\u3002\u901a\u5e38\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e00\u4e2a\u9608\u503c\uff08\u5982\u5747\u503c\u00b13\u500d\u6807\u51c6\u5dee\uff09\uff0c\u8d85\u8fc7\u8fd9\u4e2a\u8303\u56f4\u7684\u6570\u636e\u88ab\u89c6\u4e3a\u6781\u7aef\u503c\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0\u8fd9\u79cd\u65b9\u6cd5\uff1a<\/p>\n<\/p>\n<p><p><strong>\u7edf\u8ba1\u65b9\u6cd5<\/strong>\uff1a\u7edf\u8ba1\u65b9\u6cd5\u662f\u4e00\u79cd\u57fa\u4e8e\u5747\u503c\u548c\u6807\u51c6\u5dee\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u3002\u9996\u5148\uff0c\u8ba1\u7b97\u6570\u636e\u7684\u5747\u503c\u548c\u6807\u51c6\u5dee\uff0c\u7136\u540e\u8bbe\u7f6e\u4e00\u4e2a\u5408\u7406\u7684\u9608\u503c\uff08\u5982\u5747\u503c\u00b13\u500d\u6807\u51c6\u5dee\uff09\u3002\u5982\u679c\u6570\u636e\u8d85\u51fa\u8fd9\u4e2a\u8303\u56f4\uff0c\u5219\u5c06\u5176\u89c6\u4e3a\u6781\u7aef\u503c\u3002\u8fd9\u79cd\u65b9\u6cd5\u7b80\u5355\u6613\u884c\uff0c\u4f46\u5bf9\u4e8e\u975e\u6b63\u6001\u5206\u5e03\u7684\u6570\u636e\u53ef\u80fd\u4e0d\u592a\u9002\u7528\u3002\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u8fd9\u4e00\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u8ba1\u7b97\u5747\u503c\u548c\u6807\u51c6\u5dee<\/strong><\/h2>\n<p>mean = np.mean(data)<\/p>\n<p>std_dev = np.std(data)<\/p>\n<h2><strong>\u8bbe\u7f6e\u9608\u503c<\/strong><\/h2>\n<p>threshold = 3<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[np.abs(data - mean) &gt; threshold * std_dev]<\/p>\n<p>print(&quot;\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u8f7b\u677e\u8bc6\u522b\u548c\u5904\u7406\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u5176\u4ed6\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u7bb1\u7ebf\u56fe\u6cd5<\/h3>\n<\/p>\n<p><p>\u7bb1\u7ebf\u56fe\u6cd5\u662f\u57fa\u4e8e\u7edf\u8ba1\u5b66\u4e2d\u7684\u56db\u5206\u4f4d\u6570\u6765\u5904\u7406\u6781\u7aef\u503c\u7684\u4e00\u79cd\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u8ba1\u7b97\u6570\u636e\u7684\u4e0a\u56db\u5206\u4f4d\u6570\uff08Q3\uff09\u548c\u4e0b\u56db\u5206\u4f4d\u6570\uff08Q1\uff09\uff0c\u7136\u540e\u5b9a\u4e49\u4e00\u4e2a\u5185\u9650\u8303\u56f4\uff08\u901a\u5e38\u4e3a1.5\u500d\u7684\u56db\u5206\u4f4d\u8ddd\uff09\u3002\u8d85\u51fa\u5185\u9650\u8303\u56f4\u7684\u6570\u636e\u88ab\u89c6\u4e3a\u6781\u7aef\u503c\u3002<\/p>\n<\/p>\n<p><h4>\u7bb1\u7ebf\u56fe\u6cd5\u7684\u539f\u7406<\/h4>\n<\/p>\n<p><p>\u7bb1\u7ebf\u56fe\u6cd5\u901a\u8fc7\u8ba1\u7b97\u56db\u5206\u4f4d\u6570\u6765\u8bc6\u522b\u6781\u7aef\u503c\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u8ba1\u7b97\u4e0b\u56db\u5206\u4f4d\u6570\uff08Q1\uff09\u548c\u4e0a\u56db\u5206\u4f4d\u6570\uff08Q3\uff09\u3002<\/li>\n<li>\u8ba1\u7b97\u56db\u5206\u4f4d\u8ddd\uff08IQR\uff09\uff0c\u5373Q3 &#8211; Q1\u3002<\/li>\n<li>\u5b9a\u4e49\u5185\u9650\u8303\u56f4\uff1a\u4e0b\u9650\u4e3aQ1 &#8211; 1.5 * IQR\uff0c\u4e0a\u9650\u4e3aQ3 + 1.5 * IQR\u3002<\/li>\n<li>\u8d85\u51fa\u5185\u9650\u8303\u56f4\u7684\u6570\u636e\u88ab\u89c6\u4e3a\u6781\u7aef\u503c\u3002<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u8fd9\u4e00\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u6570<\/strong><\/h2>\n<p>Q1 = np.percentile(data, 25)<\/p>\n<p>Q3 = np.percentile(data, 75)<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u8ddd<\/strong><\/h2>\n<p>IQR = Q3 - Q1<\/p>\n<h2><strong>\u5b9a\u4e49\u5185\u9650\u8303\u56f4<\/strong><\/h2>\n<p>lower_bound = Q1 - 1.5 * IQR<\/p>\n<p>upper_bound = Q3 + 1.5 * IQR<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[(data &lt; lower_bound) | (data &gt; upper_bound)]<\/p>\n<p>print(&quot;\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u7bb1\u7ebf\u56fe\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8Z-score\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001Z-score\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>Z-score\u65b9\u6cd5\u662f\u4e00\u79cd\u57fa\u4e8e\u6807\u51c6\u5316\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u8ba1\u7b97\u6bcf\u4e2a\u6570\u636e\u70b9\u4e0e\u5747\u503c\u7684\u5dee\u503c\uff0c\u5e76\u5c06\u5dee\u503c\u9664\u4ee5\u6807\u51c6\u5dee\u5f97\u5230Z-score\u3002\u5982\u679cZ-score\u7684\u7edd\u5bf9\u503c\u8d85\u8fc7\u67d0\u4e2a\u9608\u503c\uff08\u901a\u5e38\u4e3a3\uff09\uff0c\u5219\u8be5\u6570\u636e\u70b9\u88ab\u89c6\u4e3a\u6781\u7aef\u503c\u3002<\/p>\n<\/p>\n<p><h4>Z-score\u65b9\u6cd5\u7684\u539f\u7406<\/h4>\n<\/p>\n<p><p>Z-score\u65b9\u6cd5\u901a\u8fc7\u6807\u51c6\u5316\u6570\u636e\u6765\u8bc6\u522b\u6781\u7aef\u503c\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u8ba1\u7b97\u6570\u636e\u7684\u5747\u503c\u548c\u6807\u51c6\u5dee\u3002<\/li>\n<li>\u5bf9\u6bcf\u4e2a\u6570\u636e\u70b9\uff0c\u8ba1\u7b97\u5176Z-score\uff0c\u5373\uff08\u6570\u636e\u70b9 &#8211; \u5747\u503c\uff09\/ \u6807\u51c6\u5dee\u3002<\/li>\n<li>\u8bbe\u7f6e\u4e00\u4e2a\u9608\u503c\uff08\u901a\u5e38\u4e3a3\uff09\uff0c\u8bc6\u522bZ-score\u7edd\u5bf9\u503c\u8d85\u8fc7\u9608\u503c\u7684\u6570\u636e\u70b9\u4e3a\u6781\u7aef\u503c\u3002<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u8fd9\u4e00\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u8ba1\u7b97\u5747\u503c\u548c\u6807\u51c6\u5dee<\/strong><\/h2>\n<p>mean = np.mean(data)<\/p>\n<p>std_dev = np.std(data)<\/p>\n<h2><strong>\u8ba1\u7b97Z-score<\/strong><\/h2>\n<p>z_scores = (data - mean) \/ std_dev<\/p>\n<h2><strong>\u8bbe\u7f6e\u9608\u503c<\/strong><\/h2>\n<p>threshold = 3<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[np.abs(z_scores) &gt; threshold]<\/p>\n<p>print(&quot;\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Z-score\u65b9\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8IQR\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001IQR\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>IQR\u65b9\u6cd5\u662f\u4e00\u79cd\u57fa\u4e8e\u56db\u5206\u4f4d\u8ddd\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u3002\u5b83\u901a\u8fc7\u8ba1\u7b97\u6570\u636e\u7684\u4e0a\u56db\u5206\u4f4d\u6570\uff08Q3\uff09\u548c\u4e0b\u56db\u5206\u4f4d\u6570\uff08Q1\uff09\uff0c\u7136\u540e\u5b9a\u4e49\u4e00\u4e2a\u5185\u9650\u8303\u56f4\uff08\u901a\u5e38\u4e3a1.5\u500d\u7684\u56db\u5206\u4f4d\u8ddd\uff09\u3002\u8d85\u51fa\u5185\u9650\u8303\u56f4\u7684\u6570\u636e\u88ab\u89c6\u4e3a\u6781\u7aef\u503c\u3002<\/p>\n<\/p>\n<p><h4>IQR\u65b9\u6cd5\u7684\u539f\u7406<\/h4>\n<\/p>\n<p><p>IQR\u65b9\u6cd5\u4e0e\u7bb1\u7ebf\u56fe\u6cd5\u7c7b\u4f3c\uff0c\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u8ba1\u7b97\u4e0b\u56db\u5206\u4f4d\u6570\uff08Q1\uff09\u548c\u4e0a\u56db\u5206\u4f4d\u6570\uff08Q3\uff09\u3002<\/li>\n<li>\u8ba1\u7b97\u56db\u5206\u4f4d\u8ddd\uff08IQR\uff09\uff0c\u5373Q3 &#8211; Q1\u3002<\/li>\n<li>\u5b9a\u4e49\u5185\u9650\u8303\u56f4\uff1a\u4e0b\u9650\u4e3aQ1 &#8211; 1.5 * IQR\uff0c\u4e0a\u9650\u4e3aQ3 + 1.5 * IQR\u3002<\/li>\n<li>\u8d85\u51fa\u5185\u9650\u8303\u56f4\u7684\u6570\u636e\u88ab\u89c6\u4e3a\u6781\u7aef\u503c\u3002<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u8fd9\u4e00\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u6570<\/strong><\/h2>\n<p>Q1 = np.percentile(data, 25)<\/p>\n<p>Q3 = np.percentile(data, 75)<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u8ddd<\/strong><\/h2>\n<p>IQR = Q3 - Q1<\/p>\n<h2><strong>\u5b9a\u4e49\u5185\u9650\u8303\u56f4<\/strong><\/h2>\n<p>lower_bound = Q1 - 1.5 * IQR<\/p>\n<p>upper_bound = Q3 + 1.5 * IQR<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[(data &lt; lower_bound) | (data &gt; upper_bound)]<\/p>\n<p>print(&quot;\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528IQR\u65b9\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u4e00\u4e9b\u5904\u7406\u6781\u7aef\u503c\u7684\u5176\u4ed6\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u56db\u3001\u5176\u4ed6\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u9664\u4e86\u4e0a\u8ff0\u5e38\u89c1\u7684\u65b9\u6cd5\u5916\uff0c\u8fd8\u6709\u4e00\u4e9b\u5176\u4ed6\u7684\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\uff0c\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>Winsorization<\/strong>\uff1a\u5c06\u6781\u7aef\u503c\u66ff\u6362\u4e3a\u4e00\u5b9a\u767e\u5206\u4f4d\u6570\u7684\u503c\uff0c\u4ee5\u51cf\u5c11\u5176\u5bf9\u7edf\u8ba1\u7ed3\u679c\u7684\u5f71\u54cd\u3002<\/li>\n<li><strong>\u53d8\u6362<\/strong>\uff1a\u5bf9\u6570\u636e\u8fdb\u884c\u5bf9\u6570\u53d8\u6362\u3001\u5e73\u65b9\u6839\u53d8\u6362\u7b49\uff0c\u4ee5\u51cf\u5c0f\u6781\u7aef\u503c\u7684\u5f71\u54cd\u3002<\/li>\n<li><strong>\u526a\u5207<\/strong>\uff1a\u76f4\u63a5\u5c06\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u526a\u5207\u5230\u67d0\u4e2a\u9608\u503c\u4ee5\u5185\u3002<\/li>\n<\/ol>\n<p><h4>Winsorization<\/h4>\n<\/p>\n<p><p>Winsorization\u662f\u4e00\u79cd\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\uff0c\u901a\u8fc7\u5c06\u6781\u7aef\u503c\u66ff\u6362\u4e3a\u4e00\u5b9a\u767e\u5206\u4f4d\u6570\u7684\u503c\u6765\u51cf\u5c11\u5176\u5f71\u54cd\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u786e\u5b9a\u4e0a\u4e0b\u767e\u5206\u4f4d\u6570\uff08\u59821%\u548c99%\uff09\u3002<\/li>\n<li>\u5c06\u4f4e\u4e8e\u4e0b\u767e\u5206\u4f4d\u6570\u7684\u6570\u636e\u66ff\u6362\u4e3a\u4e0b\u767e\u5206\u4f4d\u6570\u7684\u503c\uff0c\u5c06\u9ad8\u4e8e\u4e0a\u767e\u5206\u4f4d\u6570\u7684\u6570\u636e\u66ff\u6362\u4e3a\u4e0a\u767e\u5206\u4f4d\u6570\u7684\u503c\u3002<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u8fd9\u4e00\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u786e\u5b9a\u4e0a\u4e0b\u767e\u5206\u4f4d\u6570<\/strong><\/h2>\n<p>lower_percentile = 1<\/p>\n<p>upper_percentile = 99<\/p>\n<h2><strong>\u8ba1\u7b97\u767e\u5206\u4f4d\u6570\u7684\u503c<\/strong><\/h2>\n<p>lower_bound = np.percentile(data, lower_percentile)<\/p>\n<p>upper_bound = np.percentile(data, upper_percentile)<\/p>\n<h2><strong>\u8fdb\u884cWinsorization<\/strong><\/h2>\n<p>data_winsorized = np.clip(data, lower_bound, upper_bound)<\/p>\n<p>print(&quot;Winsorized\u6570\u636e:&quot;, data_winsorized)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528Winsorization\u65b9\u6cd5\u5904\u7406\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u53d8\u6362\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>\u53d8\u6362<\/h4>\n<\/p>\n<p><p>\u53d8\u6362\u662f\u4e00\u79cd\u901a\u8fc7\u5bf9\u6570\u636e\u8fdb\u884c\u6570\u5b66\u53d8\u6362\u6765\u51cf\u5c0f\u6781\u7aef\u503c\u5f71\u54cd\u7684\u65b9\u6cd5\u3002\u5e38\u89c1\u7684\u53d8\u6362\u65b9\u6cd5\u5305\u62ec\u5bf9\u6570\u53d8\u6362\u3001\u5e73\u65b9\u6839\u53d8\u6362\u7b49\u3002<\/p>\n<\/p>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u5bf9\u6570\u53d8\u6362\u548c\u5e73\u65b9\u6839\u53d8\u6362\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u5bf9\u6570\u53d8\u6362<\/strong><\/h2>\n<p>data_log_transformed = np.log1p(data)<\/p>\n<h2><strong>\u5e73\u65b9\u6839\u53d8\u6362<\/strong><\/h2>\n<p>data_sqrt_transformed = np.sqrt(data)<\/p>\n<p>print(&quot;\u5bf9\u6570\u53d8\u6362\u540e\u7684\u6570\u636e:&quot;, data_log_transformed)<\/p>\n<p>print(&quot;\u5e73\u65b9\u6839\u53d8\u6362\u540e\u7684\u6570\u636e:&quot;, data_sqrt_transformed)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5bf9\u6570\u53d8\u6362\u548c\u5e73\u65b9\u6839\u53d8\u6362\u6765\u51cf\u5c0f\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u5f71\u54cd\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u526a\u5207\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h4>\u526a\u5207<\/h4>\n<\/p>\n<p><p>\u526a\u5207\u662f\u4e00\u79cd\u76f4\u63a5\u5c06\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u526a\u5207\u5230\u67d0\u4e2a\u9608\u503c\u4ee5\u5185\u7684\u65b9\u6cd5\u3002\u5177\u4f53\u6b65\u9aa4\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<ol>\n<li>\u8bbe\u7f6e\u4e0a\u4e0b\u9650\u9608\u503c\u3002<\/li>\n<li>\u5c06\u4f4e\u4e8e\u4e0b\u9650\u7684\u6570\u636e\u66ff\u6362\u4e3a\u4e0b\u9650\u7684\u503c\uff0c\u5c06\u9ad8\u4e8e\u4e0a\u9650\u7684\u6570\u636e\u66ff\u6362\u4e3a\u4e0a\u9650\u7684\u503c\u3002<\/li>\n<\/ol>\n<p><p>\u4ee5\u4e0b\u662f\u4f7f\u7528Python\u4ee3\u7801\u5b9e\u73b0\u8fd9\u4e00\u65b9\u6cd5\u7684\u793a\u4f8b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u8bbe\u7f6e\u4e0a\u4e0b\u9650\u9608\u503c<\/strong><\/h2>\n<p>lower_bound = -2<\/p>\n<p>upper_bound = 2<\/p>\n<h2><strong>\u8fdb\u884c\u526a\u5207<\/strong><\/h2>\n<p>data_clipped = np.clip(data, lower_bound, upper_bound)<\/p>\n<p>print(&quot;\u526a\u5207\u540e\u7684\u6570\u636e:&quot;, data_clipped)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u4ee3\u7801\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u526a\u5207\u65b9\u6cd5\u5904\u7406\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u5c06\u63a2\u8ba8\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e94\u3001\u9009\u62e9\u5408\u9002\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5<\/h3>\n<\/p>\n<p><p>\u5728\u5904\u7406\u6781\u7aef\u503c\u65f6\uff0c\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u975e\u5e38\u91cd\u8981\u3002\u4e0d\u540c\u7684\u65b9\u6cd5\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u6570\u636e\u5206\u5e03\u548c\u5e94\u7528\u573a\u666f\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u9009\u62e9\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u7684\u5efa\u8bae\uff1a<\/p>\n<\/p>\n<ol>\n<li><strong>\u6570\u636e\u5206\u5e03<\/strong>\uff1a\u5982\u679c\u6570\u636e\u662f\u6b63\u6001\u5206\u5e03\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528Z-score\u65b9\u6cd5\u3002\u5982\u679c\u6570\u636e\u4e0d\u662f\u6b63\u6001\u5206\u5e03\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7bb1\u7ebf\u56fe\u6cd5\u6216IQR\u65b9\u6cd5\u3002<\/li>\n<li><strong>\u5e94\u7528\u573a\u666f<\/strong>\uff1a\u5728\u4e00\u4e9b\u5e94\u7528\u573a\u666f\u4e2d\uff0c\u6781\u7aef\u503c\u53ef\u80fd\u5177\u6709\u91cd\u8981\u610f\u4e49\uff0c\u4f8b\u5982\u91d1\u878d\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u4ea4\u6613\u3002\u5728\u8fd9\u79cd\u60c5\u51b5\u4e0b\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528Winsorization\u6216\u53d8\u6362\u65b9\u6cd5\uff0c\u4ee5\u4fdd\u7559\u6781\u7aef\u503c\u7684\u90e8\u5206\u4fe1\u606f\u3002<\/li>\n<li><strong>\u6570\u636e\u91cf<\/strong>\uff1a\u5bf9\u4e8e\u5927\u6570\u636e\u96c6\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u526a\u5207\u65b9\u6cd5\uff0c\u56e0\u4e3a\u5176\u8ba1\u7b97\u91cf\u8f83\u5c0f\uff0c\u5904\u7406\u901f\u5ea6\u8f83\u5feb\u3002<\/li>\n<\/ol>\n<p><h3>\u516d\u3001\u5b9e\u6218\u6848\u4f8b<\/h3>\n<\/p>\n<p><p>\u4e3a\u4e86\u66f4\u597d\u5730\u7406\u89e3\u4e0a\u8ff0\u65b9\u6cd5\uff0c\u6211\u4eec\u5c06\u4f7f\u7528\u4e00\u4e2a\u5b9e\u9645\u6848\u4f8b\u6765\u6f14\u793a\u5982\u4f55\u5904\u7406\u6781\u7aef\u503c\u3002\u5047\u8bbe\u6211\u4eec\u6709\u4e00\u4e2a\u5305\u542b1000\u4e2a\u6570\u636e\u70b9\u7684\u6570\u636e\u96c6\uff0c\u5176\u4e2d\u4e00\u4e9b\u6570\u636e\u70b9\u662f\u6781\u7aef\u503c\u3002\u6211\u4eec\u5c06\u4f7f\u7528\u4e0d\u540c\u7684\u65b9\u6cd5\u6765\u8bc6\u522b\u548c\u5904\u7406\u8fd9\u4e9b\u6781\u7aef\u503c\u3002<\/p>\n<\/p>\n<p><h4>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/h4>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u6211\u4eec\u751f\u6210\u4e00\u4e2a\u5305\u542b\u6781\u7aef\u503c\u7684\u793a\u4f8b\u6570\u636e\u96c6\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u751f\u6210\u793a\u4f8b\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.randn(1000)<\/p>\n<h2><strong>\u6dfb\u52a0\u4e00\u4e9b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>data[::100] = np.random.choice([15, -15], size=10)<\/p>\n<p>print(&quot;\u793a\u4f8b\u6570\u636e:&quot;, data)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528\u7edf\u8ba1\u65b9\u6cd5\u8bc6\u522b\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f7f\u7528\u7edf\u8ba1\u65b9\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u8ba1\u7b97\u5747\u503c\u548c\u6807\u51c6\u5dee<\/strong><\/h2>\n<p>mean = np.mean(data)<\/p>\n<p>std_dev = np.std(data)<\/p>\n<h2><strong>\u8bbe\u7f6e\u9608\u503c<\/strong><\/h2>\n<p>threshold = 3<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[np.abs(data - mean) &gt; threshold * std_dev]<\/p>\n<p>print(&quot;\u7edf\u8ba1\u65b9\u6cd5\u8bc6\u522b\u7684\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528\u7bb1\u7ebf\u56fe\u6cd5\u8bc6\u522b\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528\u7bb1\u7ebf\u56fe\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u6570<\/strong><\/h2>\n<p>Q1 = np.percentile(data, 25)<\/p>\n<p>Q3 = np.percentile(data, 75)<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u8ddd<\/strong><\/h2>\n<p>IQR = Q3 - Q1<\/p>\n<h2><strong>\u5b9a\u4e49\u5185\u9650\u8303\u56f4<\/strong><\/h2>\n<p>lower_bound = Q1 - 1.5 * IQR<\/p>\n<p>upper_bound = Q3 + 1.5 * IQR<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[(data &lt; lower_bound) | (data &gt; upper_bound)]<\/p>\n<p>print(&quot;\u7bb1\u7ebf\u56fe\u6cd5\u8bc6\u522b\u7684\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528Z-score\u65b9\u6cd5\u8bc6\u522b\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f7f\u7528Z-score\u65b9\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u8ba1\u7b97\u5747\u503c\u548c\u6807\u51c6\u5dee<\/strong><\/h2>\n<p>mean = np.mean(data)<\/p>\n<p>std_dev = np.std(data)<\/p>\n<h2><strong>\u8ba1\u7b97Z-score<\/strong><\/h2>\n<p>z_scores = (data - mean) \/ std_dev<\/p>\n<h2><strong>\u8bbe\u7f6e\u9608\u503c<\/strong><\/h2>\n<p>threshold = 3<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[np.abs(z_scores) &gt; threshold]<\/p>\n<p>print(&quot;Z-score\u65b9\u6cd5\u8bc6\u522b\u7684\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528IQR\u65b9\u6cd5\u8bc6\u522b\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528IQR\u65b9\u6cd5\u8bc6\u522b\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u6570<\/strong><\/h2>\n<p>Q1 = np.percentile(data, 25)<\/p>\n<p>Q3 = np.percentile(data, 75)<\/p>\n<h2><strong>\u8ba1\u7b97\u56db\u5206\u4f4d\u8ddd<\/strong><\/h2>\n<p>IQR = Q3 - Q1<\/p>\n<h2><strong>\u5b9a\u4e49\u5185\u9650\u8303\u56f4<\/strong><\/h2>\n<p>lower_bound = Q1 - 1.5 * IQR<\/p>\n<p>upper_bound = Q3 + 1.5 * IQR<\/p>\n<h2><strong>\u8bc6\u522b\u6781\u7aef\u503c<\/strong><\/h2>\n<p>outliers = data[(data &lt; lower_bound) | (data &gt; upper_bound)]<\/p>\n<p>print(&quot;IQR\u65b9\u6cd5\u8bc6\u522b\u7684\u6781\u7aef\u503c:&quot;, outliers)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528Winsorization\u65b9\u6cd5\u5904\u7406\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u4f7f\u7528Winsorization\u65b9\u6cd5\u5904\u7406\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u786e\u5b9a\u4e0a\u4e0b\u767e\u5206\u4f4d\u6570<\/strong><\/h2>\n<p>lower_percentile = 1<\/p>\n<p>upper_percentile = 99<\/p>\n<h2><strong>\u8ba1\u7b97\u767e\u5206\u4f4d\u6570\u7684\u503c<\/strong><\/h2>\n<p>lower_bound = np.percentile(data, lower_percentile)<\/p>\n<p>upper_bound = np.percentile(data, upper_percentile)<\/p>\n<h2><strong>\u8fdb\u884cWinsorization<\/strong><\/h2>\n<p>data_winsorized = np.clip(data, lower_bound, upper_bound)<\/p>\n<p>print(&quot;Winsorization\u5904\u7406\u540e\u7684\u6570\u636e:&quot;, data_winsorized)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528\u53d8\u6362\u65b9\u6cd5\u5904\u7406\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u7136\u540e\uff0c\u6211\u4eec\u4f7f\u7528\u5bf9\u6570\u53d8\u6362\u548c\u5e73\u65b9\u6839\u53d8\u6362\u6765\u5904\u7406\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u5bf9\u6570\u53d8\u6362<\/strong><\/h2>\n<p>data_log_transformed = np.log1p(data)<\/p>\n<h2><strong>\u5e73\u65b9\u6839\u53d8\u6362<\/strong><\/h2>\n<p>data_sqrt_transformed = np.sqrt(data)<\/p>\n<p>print(&quot;\u5bf9\u6570\u53d8\u6362\u540e\u7684\u6570\u636e:&quot;, data_log_transformed)<\/p>\n<p>print(&quot;\u5e73\u65b9\u6839\u53d8\u6362\u540e\u7684\u6570\u636e:&quot;, data_sqrt_transformed)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>\u4f7f\u7528\u526a\u5207\u65b9\u6cd5\u5904\u7406\u6781\u7aef\u503c<\/h4>\n<\/p>\n<p><p>\u6700\u540e\uff0c\u6211\u4eec\u4f7f\u7528\u526a\u5207\u65b9\u6cd5\u5904\u7406\u6570\u636e\u4e2d\u7684\u6781\u7aef\u503c\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<h2><strong>\u8bbe\u7f6e\u4e0a\u4e0b\u9650\u9608\u503c<\/strong><\/h2>\n<p>lower_bound = -2<\/p>\n<p>upper_bound = 2<\/p>\n<h2><strong>\u8fdb\u884c\u526a\u5207<\/strong><\/h2>\n<p>data_clipped = np.clip(data, lower_bound, upper_bound)<\/p>\n<p>print(&quot;\u526a\u5207\u5904\u7406\u540e\u7684\u6570\u636e:&quot;, data_clipped)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u901a\u8fc7\u4e0a\u8ff0\u5b9e\u6218\u6848\u4f8b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u4e0d\u540c\u7684\u65b9\u6cd5\u5728\u5904\u7406\u6781\u7aef\u503c\u65f6\u7684\u6548\u679c\u548c\u5dee\u5f02\u3002\u6839\u636e\u6570\u636e\u7684\u5206\u5e03\u548c\u5e94\u7528\u573a\u666f\uff0c\u9009\u62e9\u5408\u9002\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u6570\u636e\u5206\u6790\u7684\u51c6\u786e\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<p><h3>\u4e03\u3001\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u672c\u6587\u4ecb\u7ecd\u4e86\u591a\u79cd\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\uff0c\u5305\u62ec\u7edf\u8ba1\u65b9\u6cd5\u3001\u7bb1\u7ebf\u56fe\u6cd5\u3001Z-score\u65b9\u6cd5\u3001IQR\u65b9\u6cd5\u3001Winsorization\u3001\u53d8\u6362\u548c\u526a\u5207\u65b9\u6cd5\u3002\u6bcf\u79cd\u65b9\u6cd5\u90fd\u6709\u5176\u9002\u7528\u7684\u573a\u666f\u548c\u4f18\u7f3a\u70b9\u3002\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u7684\u6f14\u793a\uff0c\u6211\u4eec\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u8fd9\u4e9b\u65b9\u6cd5\u7684\u5e94\u7528\u548c\u6548\u679c\u3002\u5728\u5b9e\u9645\u6570\u636e\u5206\u6790\u8fc7\u7a0b\u4e2d\uff0c\u9009\u62e9\u5408\u9002\u7684\u6781\u7aef\u503c\u5904\u7406\u65b9\u6cd5\u53ef\u4ee5\u6709\u6548\u63d0\u9ad8\u5206\u6790\u7ed3\u679c\u7684\u51c6\u786e\u6027\u548c\u53ef\u9760\u6027\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u6781\u7aef\u503c\u662f\u4ec0\u4e48\uff1f\u5982\u4f55\u8bc6\u522b\u5b83\u4eec\uff1f<\/strong><br \/>\u6781\u7aef\u503c\uff0c\u901a\u5e38\u6307\u5728\u6570\u636e\u96c6\u4e2d\u8fdc\u79bb\u5176\u4ed6\u89c2\u5bdf\u503c\u7684\u6570\u503c\u3002\u5b83\u4eec\u53ef\u80fd\u662f\u7531\u4e8e\u6d4b\u91cf\u9519\u8bef\u3001\u6570\u636e\u8f93\u5165\u9519\u8bef\u6216\u81ea\u7136\u6ce2\u52a8\u5f15\u8d77\u7684\u3002\u8bc6\u522b\u6781\u7aef\u503c\u7684\u65b9\u6cd5\u5305\u62ec\u4f7f\u7528\u7edf\u8ba1\u65b9\u6cd5\u5982\u6807\u51c6\u5dee\u3001\u56db\u5206\u4f4d\u6570\u6cd5\u4ee5\u53ca\u56fe\u5f62\u5316\u5de5\u5177\u5982\u7bb1\u5f62\u56fe\u548c\u6563\u70b9\u56fe\u3002<\/p>\n<p><strong>\u5728Python\u4e2d\u6709\u54ea\u4e9b\u5e93\u53ef\u4ee5\u5904\u7406\u6781\u7aef\u503c\uff1f<\/strong><br \/>Python\u4e2d\u5904\u7406\u6781\u7aef\u503c\u7684\u4e3b\u8981\u5e93\u5305\u62ecPandas\u3001NumPy\u548cSciPy\u3002Pandas\u63d0\u4f9b\u4e86\u65b9\u4fbf\u7684\u6570\u636e\u5904\u7406\u529f\u80fd\uff0c\u53ef\u4ee5\u8f7b\u677e\u6e05\u7406\u548c\u7b5b\u9009\u6570\u636e\u3002NumPy\u5219\u6709\u4e30\u5bcc\u7684\u6570\u5b66\u51fd\u6570\uff0c\u5e2e\u52a9\u8bc6\u522b\u548c\u5904\u7406\u6781\u7aef\u503c\u3002SciPy\u5219\u9002\u5408\u8fdb\u884c\u66f4\u590d\u6742\u7684\u7edf\u8ba1\u5206\u6790\u3002<\/p>\n<p><strong>\u5982\u4f55\u6709\u6548\u5730\u5904\u7406\u6781\u7aef\u503c\uff1f<\/strong><br \/>\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\u3002\u53ef\u4ee5\u9009\u62e9\u5220\u9664\u8fd9\u4e9b\u503c\uff0c\u66ff\u6362\u4e3a\u4e2d\u4f4d\u6570\u6216\u5747\u503c\uff0c\u6216\u8005\u4f7f\u7528\u66f4\u590d\u6742\u7684\u63d2\u503c\u65b9\u6cd5\u3002\u6b64\u5916\uff0c\u5e94\u7528\u5bf9\u6570\u8f6c\u6362\u6216Z-score\u6807\u51c6\u5316\u4e5f\u662f\u5e38\u7528\u7684\u5904\u7406\u6280\u5de7\u3002\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u9700\u8981\u6839\u636e\u6570\u636e\u7684\u5177\u4f53\u60c5\u51b5\u548c\u5206\u6790\u76ee\u6807\u6765\u51b3\u5b9a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5904\u7406\u6781\u7aef\u503c\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u5305\u62ec\u7edf\u8ba1\u65b9\u6cd5\u3001\u7bb1\u7ebf\u56fe\u6cd5\u3001Z-score\u65b9\u6cd5\u3001IQR\u65b9\u6cd5\u7b49\u3002\u5176\u4e2d\uff0c\u7edf\u8ba1\u65b9\u6cd5\u662f [&hellip;]","protected":false},"author":3,"featured_media":0,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167642"}],"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=1167642"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1167642\/revisions"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1167642"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1167642"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1167642"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}