{"id":1118465,"date":"2025-01-08T18:35:35","date_gmt":"2025-01-08T10:35:35","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1118465.html"},"modified":"2025-01-08T18:35:37","modified_gmt":"2025-01-08T10:35:37","slug":"%e5%a6%82%e4%bd%95%e5%8f%91%e7%8e%b0%e5%a4%a7%e6%95%b0%e6%8d%ae%e4%b8%ad%e7%9a%84%e5%bc%82%e5%b8%b8%e5%80%bcpython","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1118465.html","title":{"rendered":"\u5982\u4f55\u53d1\u73b0\u5927\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u503cpython"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25081943\/ea26a027-9e9b-45a9-a87b-a3d662e75f17.webp\" alt=\"\u5982\u4f55\u53d1\u73b0\u5927\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u503cpython\" \/><\/p>\n<p><p> \u5728\u5927\u6570\u636e\u4e2d\u53d1\u73b0\u5f02\u5e38\u503c\u662f\u6570\u636e\u5206\u6790\u548c\u6570\u636e\u6e05\u7406\u4e2d\u7684\u91cd\u8981\u6b65\u9aa4\u3002<strong>\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u7edf\u8ba1\u65b9\u6cd5\uff08\u5982Z\u5206\u6570\u3001\u56db\u5206\u4f4d\u8ddd\uff09\u3001<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u65b9\u6cd5\uff08\u5982\u5b64\u7acb\u68ee\u6797\u3001\u5c40\u90e8\u5f02\u5e38\u56e0\u5b50\uff09\u3001\u53ef\u89c6\u5316\u65b9\u6cd5\uff08\u5982\u7bb1\u7ebf\u56fe\u3001\u6563\u70b9\u56fe\uff09<\/strong>\uff0c\u4f7f\u7528Python\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u8fd9\u4e9b\u65b9\u6cd5\u3002\u63a5\u4e0b\u6765\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u4f7f\u7528Python\u8fdb\u884c\u5f02\u5e38\u503c\u68c0\u6d4b\u7684\u591a\u79cd\u65b9\u6cd5\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u7edf\u8ba1\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1. Z\u5206\u6570\uff08Z-score\uff09<\/h4>\n<\/p>\n<p><p>Z\u5206\u6570\u662f\u4e00\u79cd\u8861\u91cf\u6570\u636e\u70b9\u4e0e\u5747\u503c\u7684\u504f\u79bb\u7a0b\u5ea6\u7684\u65b9\u6cd5\u3002\u5176\u8ba1\u7b97\u516c\u5f0f\u4e3a\uff1a<\/p>\n<p>[ Z = \\frac{(X &#8211; \\mu)}{\\sigma} ]<\/p>\n<p>\u5176\u4e2d\uff0c( X ) \u662f\u6570\u636e\u70b9\uff0c( \\mu ) \u662f\u5747\u503c\uff0c( \\sigma ) \u662f\u6807\u51c6\u5dee\u3002Z\u5206\u6570\u5927\u4e8e\u67d0\u4e2a\u9608\u503c\uff08\u59823\u6216-3\uff09\u7684\u6570\u636e\u70b9\u88ab\u8ba4\u4e3a\u662f\u5f02\u5e38\u503c\u3002<\/p>\n<\/p>\n<p><h5>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h5>\n<\/p>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import pandas as pd<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.normal(0, 1, 1000)<\/p>\n<p>data = np.append(data, [10, 20, -10, -20])  # \u6dfb\u52a0\u4e00\u4e9b\u5f02\u5e38\u503c<\/p>\n<h2><strong>\u8ba1\u7b97Z\u5206\u6570<\/strong><\/h2>\n<p>mean = np.mean(data)<\/p>\n<p>std = np.std(data)<\/p>\n<p>z_scores = [(x - mean) \/ std for x in data]<\/p>\n<h2><strong>\u8bbe\u5b9a\u9608\u503c<\/strong><\/h2>\n<p>threshold = 3<\/p>\n<p>outliers = np.where(np.abs(z_scores) &gt; threshold)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\u7d22\u5f15\uff1a&quot;, outliers)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\uff1a&quot;, data[outliers])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u56db\u5206\u4f4d\u8ddd\uff08IQR\uff09<\/h4>\n<\/p>\n<p><p>\u56db\u5206\u4f4d\u8ddd\u6cd5\u57fa\u4e8e\u6570\u636e\u7684\u4e2d\u4f4d\u6570\u3001\u4e0a\u56db\u5206\u4f4d\u6570\u548c\u4e0b\u56db\u5206\u4f4d\u6570\u3002\u8ba1\u7b97\u516c\u5f0f\u4e3a\uff1a<\/p>\n<p>[ IQR = Q3 &#8211; Q1 ]<\/p>\n<p>\u5176\u4e2d\uff0c( Q1 ) \u662f\u7b2c25\u767e\u5206\u4f4d\u6570\uff0c( Q3 ) \u662f\u7b2c75\u767e\u5206\u4f4d\u6570\u3002\u5f02\u5e38\u503c\u901a\u5e38\u88ab\u5b9a\u4e49\u4e3a\u5c0f\u4e8e ( Q1 &#8211; 1.5 \\times IQR ) \u6216\u5927\u4e8e ( Q3 + 1.5 \\times IQR ) \u7684\u6570\u636e\u70b9\u3002<\/p>\n<\/p>\n<p><h5>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h5>\n<\/p>\n<p><pre><code class=\"language-python\">data = np.append(data, [10, 20, -10, -20])  # \u6dfb\u52a0\u4e00\u4e9b\u5f02\u5e38\u503c<\/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<p>IQR = Q3 - Q1<\/p>\n<h2><strong>\u8bbe\u5b9a\u9608\u503c<\/strong><\/h2>\n<p>lower_bound = Q1 - 1.5 * IQR<\/p>\n<p>upper_bound = Q3 + 1.5 * IQR<\/p>\n<p>outliers = np.where((data &lt; lower_bound) | (data &gt; upper_bound))<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\u7d22\u5f15\uff1a&quot;, outliers)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\uff1a&quot;, data[outliers])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e8c\u3001\u673a\u5668\u5b66\u4e60\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1. \u5b64\u7acb\u68ee\u6797\uff08Isolation Forest\uff09<\/h4>\n<\/p>\n<p><p>\u5b64\u7acb\u68ee\u6797\u662f\u4e00\u79cd\u57fa\u4e8e\u6811\u7ed3\u6784\u7684\u65e0\u76d1\u7763\u5b66\u4e60\u7b97\u6cd5\uff0c\u4e13\u95e8\u7528\u4e8e\u5f02\u5e38\u503c\u68c0\u6d4b\u3002\u5b83\u901a\u8fc7\u968f\u673a\u9009\u62e9\u7279\u5f81\u548c\u968f\u673a\u9009\u62e9\u5206\u5272\u503c\u6765\u6784\u5efa\u6811\uff0c\u5f02\u5e38\u503c\u901a\u5e38\u5728\u6811\u7ed3\u6784\u4e2d\u66f4\u63a5\u8fd1\u6839\u8282\u70b9\u3002<\/p>\n<\/p>\n<p><h5>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h5>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.ensemble import IsolationForest<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.normal(0, 1, 1000).reshape(-1, 1)<\/p>\n<p>data = np.append(data, [[10], [20], [-10], [-20]]).reshape(-1, 1)  # \u6dfb\u52a0\u4e00\u4e9b\u5f02\u5e38\u503c<\/p>\n<h2><strong>\u521b\u5efa\u5b64\u7acb\u68ee\u6797\u6a21\u578b<\/strong><\/h2>\n<p>clf = IsolationForest(contamination=0.01)<\/p>\n<p>clf.fit(data)<\/p>\n<h2><strong>\u9884\u6d4b\u5f02\u5e38\u503c<\/strong><\/h2>\n<p>predictions = clf.predict(data)<\/p>\n<p>outliers = np.where(predictions == -1)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\u7d22\u5f15\uff1a&quot;, outliers)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\uff1a&quot;, data[outliers])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u5c40\u90e8\u5f02\u5e38\u56e0\u5b50\uff08LOF\uff09<\/h4>\n<\/p>\n<p><p>\u5c40\u90e8\u5f02\u5e38\u56e0\u5b50\u65b9\u6cd5\u901a\u8fc7\u6bd4\u8f83\u6570\u636e\u70b9\u4e0e\u5176\u90bb\u5c45\u7684\u5bc6\u5ea6\u6765\u68c0\u6d4b\u5f02\u5e38\u503c\u3002\u5982\u679c\u4e00\u4e2a\u70b9\u7684\u5bc6\u5ea6\u663e\u8457\u4f4e\u4e8e\u5176\u90bb\u5c45\uff0c\u5219\u8be5\u70b9\u88ab\u8ba4\u4e3a\u662f\u5f02\u5e38\u503c\u3002<\/p>\n<\/p>\n<p><h5>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h5>\n<\/p>\n<p><pre><code class=\"language-python\">from sklearn.neighbors import LocalOutlierFactor<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.normal(0, 1, 1000).reshape(-1, 1)<\/p>\n<p>data = np.append(data, [[10], [20], [-10], [-20]]).reshape(-1, 1)  # \u6dfb\u52a0\u4e00\u4e9b\u5f02\u5e38\u503c<\/p>\n<h2><strong>\u521b\u5efaLOF\u6a21\u578b<\/strong><\/h2>\n<p>clf = LocalOutlierFactor(n_neighbors=20, contamination=0.01)<\/p>\n<p>predictions = clf.fit_predict(data)<\/p>\n<h2><strong>\u9884\u6d4b\u5f02\u5e38\u503c<\/strong><\/h2>\n<p>outliers = np.where(predictions == -1)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\u7d22\u5f15\uff1a&quot;, outliers)<\/p>\n<p>print(&quot;\u5f02\u5e38\u503c\uff1a&quot;, data[outliers])<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u4e09\u3001\u53ef\u89c6\u5316\u65b9\u6cd5<\/h3>\n<\/p>\n<p><h4>1. \u7bb1\u7ebf\u56fe\uff08Boxplot\uff09<\/h4>\n<\/p>\n<p><p>\u7bb1\u7ebf\u56fe\u662f\u4e00\u79cd\u7b80\u5355\u76f4\u89c2\u7684\u53ef\u89c6\u5316\u65b9\u6cd5\uff0c\u901a\u8fc7\u663e\u793a\u6570\u636e\u7684\u5206\u5e03\u60c5\u51b5\u6765\u68c0\u6d4b\u5f02\u5e38\u503c\u3002<\/p>\n<\/p>\n<p><h5>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h5>\n<\/p>\n<p><pre><code class=\"language-python\">import matplotlib.pyplot as plt<\/p>\n<h2><strong>\u751f\u6210\u6570\u636e<\/strong><\/h2>\n<p>data = np.random.normal(0, 1, 1000)<\/p>\n<p>data = np.append(data, [10, 20, -10, -20])  # \u6dfb\u52a0\u4e00\u4e9b\u5f02\u5e38\u503c<\/p>\n<h2><strong>\u7ed8\u5236\u7bb1\u7ebf\u56fe<\/strong><\/h2>\n<p>plt.boxplot(data)<\/p>\n<p>plt.title(&quot;\u7bb1\u7ebf\u56fe&quot;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h4>2. \u6563\u70b9\u56fe\uff08Scatter Plot\uff09<\/h4>\n<\/p>\n<p><p>\u6563\u70b9\u56fe\u53ef\u4ee5\u5e2e\u52a9\u6211\u4eec\u76f4\u89c2\u5730\u89c2\u5bdf\u6570\u636e\u5206\u5e03\uff0c\u4ece\u800c\u53d1\u73b0\u5f02\u5e38\u503c\u3002<\/p>\n<\/p>\n<p><h5>\u793a\u4f8b\u4ee3\u7801\uff1a<\/h5>\n<\/p>\n<p><pre><code class=\"language-python\"># \u751f\u6210\u6570\u636e<\/p>\n<p>data_x = np.random.normal(0, 1, 1000)<\/p>\n<p>data_y = np.random.normal(0, 1, 1000)<\/p>\n<p>data_x = np.append(data_x, [10, 20, -10, -20])<\/p>\n<p>data_y = np.append(data_y, [10, 20, -10, -20])<\/p>\n<h2><strong>\u7ed8\u5236\u6563\u70b9\u56fe<\/strong><\/h2>\n<p>plt.scatter(data_x, data_y)<\/p>\n<p>plt.title(&quot;\u6563\u70b9\u56fe&quot;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u5b9e\u8df5\u4e2d\u7684\u7ecf\u9a8c<\/h3>\n<\/p>\n<p><h4>1. \u6570\u636e\u9884\u5904\u7406<\/h4>\n<\/p>\n<p><p>\u5728\u8fdb\u884c\u5f02\u5e38\u503c\u68c0\u6d4b\u4e4b\u524d\uff0c\u6570\u636e\u9884\u5904\u7406\u662f\u975e\u5e38\u91cd\u8981\u7684\u6b65\u9aa4\u3002\u5305\u62ec\u6570\u636e\u6e05\u6d17\u3001\u7f3a\u5931\u503c\u5904\u7406\u3001\u6570\u636e\u6807\u51c6\u5316\u7b49\u3002\u5e72\u51c0\u7684\u6570\u636e\u80fd\u591f\u63d0\u9ad8\u68c0\u6d4b\u7684\u51c6\u786e\u6027\u3002<\/p>\n<\/p>\n<p><h4>2. \u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5<\/h4>\n<\/p>\n<p><p>\u4e0d\u540c\u7684\u6570\u636e\u96c6\u548c\u5e94\u7528\u573a\u666f\u9002\u5408\u4e0d\u540c\u7684\u5f02\u5e38\u503c\u68c0\u6d4b\u65b9\u6cd5\u3002\u7edf\u8ba1\u65b9\u6cd5\u9002\u7528\u4e8e\u6570\u636e\u5206\u5e03\u8f83\u4e3a\u6b63\u5e38\u7684\u60c5\u51b5\uff0c\u800c\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\u5219\u9002\u7528\u4e8e\u66f4\u590d\u6742\u7684\u573a\u666f\u3002\u6839\u636e\u5177\u4f53\u60c5\u51b5\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u80fd\u591f\u63d0\u9ad8\u68c0\u6d4b\u6548\u679c\u3002<\/p>\n<\/p>\n<p><h4>3. \u591a\u79cd\u65b9\u6cd5\u7ed3\u5408\u4f7f\u7528<\/h4>\n<\/p>\n<p><p>\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\uff0c\u5355\u4e00\u7684\u65b9\u6cd5\u53ef\u80fd\u65e0\u6cd5\u5b8c\u5168\u68c0\u6d4b\u51fa\u6240\u6709\u7684\u5f02\u5e38\u503c\u3002\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u8fdb\u884c\u68c0\u6d4b\uff0c\u53ef\u4ee5\u63d0\u9ad8\u68c0\u6d4b\u7684\u5168\u9762\u6027\u548c\u51c6\u786e\u6027\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u5148\u4f7f\u7528\u7edf\u8ba1\u65b9\u6cd5\u8fdb\u884c\u521d\u6b65\u7b5b\u9009\uff0c\u518d\u4f7f\u7528\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\u8fdb\u884c\u8fdb\u4e00\u6b65\u68c0\u6d4b\u3002<\/p>\n<\/p>\n<p><h4>4. \u6ce8\u610f\u53c2\u6570\u8c03\u4f18<\/h4>\n<\/p>\n<p><p>\u65e0\u8bba\u662f\u7edf\u8ba1\u65b9\u6cd5\u8fd8\u662f\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\uff0c\u53c2\u6570\u7684\u9009\u62e9\u90fd\u5bf9\u68c0\u6d4b\u7ed3\u679c\u6709\u8f83\u5927\u5f71\u54cd\u3002\u4f8b\u5982\uff0c\u5b64\u7acb\u68ee\u6797\u4e2d\u7684 contamination \u53c2\u6570\u3001LOF \u4e2d\u7684 n_neighbors \u53c2\u6570\u7b49\u3002\u901a\u8fc7\u4ea4\u53c9\u9a8c\u8bc1\u7b49\u65b9\u6cd5\u8fdb\u884c\u53c2\u6570\u8c03\u4f18\uff0c\u53ef\u4ee5\u63d0\u9ad8\u6a21\u578b\u7684\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><h3>\u603b\u7ed3<\/h3>\n<\/p>\n<p><p>\u5728\u5927\u6570\u636e\u4e2d\u68c0\u6d4b\u5f02\u5e38\u503c\u662f\u6570\u636e\u5206\u6790\u548c\u6570\u636e\u6e05\u7406\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u901a\u8fc7\u7edf\u8ba1\u65b9\u6cd5\uff08\u5982Z\u5206\u6570\u3001\u56db\u5206\u4f4d\u8ddd\uff09\u3001\u673a\u5668\u5b66\u4e60\u65b9\u6cd5\uff08\u5982\u5b64\u7acb\u68ee\u6797\u3001\u5c40\u90e8\u5f02\u5e38\u56e0\u5b50\uff09\u548c\u53ef\u89c6\u5316\u65b9\u6cd5\uff08\u5982\u7bb1\u7ebf\u56fe\u3001\u6563\u70b9\u56fe\uff09\u53ef\u4ee5\u6709\u6548\u5730\u53d1\u73b0\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u503c\u3002\u7ed3\u5408\u591a\u79cd\u65b9\u6cd5\u3001\u8fdb\u884c\u6570\u636e\u9884\u5904\u7406\u3001\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\u5e76\u8fdb\u884c\u53c2\u6570\u8c03\u4f18\uff0c\u662f\u63d0\u9ad8\u68c0\u6d4b\u6548\u679c\u7684\u91cd\u8981\u624b\u6bb5\u3002\u4f7f\u7528Python\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u8fd9\u4e9b\u65b9\u6cd5\uff0c\u52a9\u529b\u6570\u636e\u5206\u6790\u5de5\u4f5c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728\u5927\u6570\u636e\u4e2d\u8bc6\u522b\u5f02\u5e38\u503c\uff1f<\/strong><\/p>\n<p>\u8bc6\u522b\u5f02\u5e38\u503c\u901a\u5e38\u6d89\u53ca\u7edf\u8ba1\u5206\u6790\u548c\u673a\u5668\u5b66\u4e60\u6280\u672f\u3002\u53ef\u4ee5\u901a\u8fc7\u4f7f\u7528\u63cf\u8ff0\u6027\u7edf\u8ba1\u65b9\u6cd5\uff0c\u6bd4\u5982Z-score\u548cIQR\uff08\u56db\u5206\u4f4d\u8ddd\uff09\uff0c\u6765\u68c0\u6d4b\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u503c\u3002\u6b64\u5916\uff0c\u5229\u7528Python\u4e2d\u7684\u5e93\uff08\u5982Pandas\u3001NumPy\u548cScikit-learn\uff09\u53ef\u4ee5\u6709\u6548\u5730\u5904\u7406\u548c\u5206\u6790\u5927\u6570\u636e\u96c6\uff0c\u5e2e\u52a9\u53d1\u73b0\u6f5c\u5728\u7684\u5f02\u5e38\u3002\u5177\u4f53\u7684\u6b65\u9aa4\u5305\u62ec\u6570\u636e\u6e05\u6d17\u3001\u53ef\u89c6\u5316\u53ca\u6a21\u578b\u8bad\u7ec3\u7b49\u3002<\/p>\n<p><strong>\u4f7f\u7528Python\u5e93\u6709\u54ea\u4e9b\u65b9\u6cd5\u6765\u68c0\u6d4b\u5f02\u5e38\u503c\uff1f<\/strong><\/p>\n<p>Python\u4e2d\u6709\u591a\u79cd\u5e93\u53ef\u4ee5\u5e2e\u52a9\u68c0\u6d4b\u5f02\u5e38\u503c\u3002Pandas\u63d0\u4f9b\u4e86\u57fa\u672c\u7684\u7edf\u8ba1\u529f\u80fd\uff0cNumPy\u53ef\u4ee5\u8fdb\u884c\u6570\u7ec4\u64cd\u4f5c\uff0cScikit-learn\u5219\u5305\u542b\u591a\u79cd\u673a\u5668\u5b66\u4e60\u7b97\u6cd5\uff0c\u4f8b\u5982\u5b64\u7acb\u68ee\u6797\uff08Isolation Forest\uff09\u548c\u5c40\u90e8\u79bb\u7fa4\u56e0\u5b50\uff08LOF\uff09\uff0c\u8fd9\u4e9b\u7b97\u6cd5\u80fd\u591f\u81ea\u52a8\u8bc6\u522b\u51fa\u6570\u636e\u4e2d\u7684\u5f02\u5e38\u3002\u6b64\u5916\uff0cMatplotlib\u548cSeaborn\u53ef\u7528\u4e8e\u6570\u636e\u53ef\u89c6\u5316\uff0c\u5e2e\u52a9\u8bc6\u522b\u5f02\u5e38\u503c\u7684\u5206\u5e03\u7279\u5f81\u3002<\/p>\n<p><strong>\u5f02\u5e38\u503c\u68c0\u6d4b\u5bf9\u5927\u6570\u636e\u5206\u6790\u6709\u4ec0\u4e48\u91cd\u8981\u6027\uff1f<\/strong><\/p>\n<p>\u5f02\u5e38\u503c\u53ef\u80fd\u4f1a\u5bf9\u6570\u636e\u5206\u6790\u7ed3\u679c\u4ea7\u751f\u91cd\u5927\u5f71\u54cd\u3002\u5b83\u4eec\u53ef\u80fd\u662f\u6570\u636e\u5f55\u5165\u9519\u8bef\u3001\u6d4b\u91cf\u8bef\u5dee\uff0c\u6216\u8005\u662f\u5b9e\u9645\u5b58\u5728\u7684\u6781\u7aef\u60c5\u51b5\u3002\u8bc6\u522b\u548c\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\u503c\u53ef\u4ee5\u63d0\u9ad8\u6a21\u578b\u7684\u51c6\u786e\u6027\u548c\u53ef\u9760\u6027\uff0c\u907f\u514d\u56e0\u5f02\u5e38\u6570\u636e\u5bfc\u81f4\u7684\u9519\u8bef\u5224\u65ad\u3002\u5728\u5927\u6570\u636e\u5206\u6790\u4e2d\uff0c\u53ca\u65f6\u53d1\u73b0\u5e76\u5904\u7406\u5f02\u5e38\u503c\u4e5f\u6709\u52a9\u4e8e\u63d0\u5347\u51b3\u7b56\u7684\u8d28\u91cf\uff0c\u786e\u4fdd\u4e1a\u52a1\u8fd0\u8425\u7684\u7a33\u5b9a\u6027\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u5728\u5927\u6570\u636e\u4e2d\u53d1\u73b0\u5f02\u5e38\u503c\u662f\u6570\u636e\u5206\u6790\u548c\u6570\u636e\u6e05\u7406\u4e2d\u7684\u91cd\u8981\u6b65\u9aa4\u3002\u5e38\u7528\u7684\u65b9\u6cd5\u5305\u62ec\uff1a\u7edf\u8ba1\u65b9\u6cd5\uff08\u5982Z\u5206\u6570\u3001\u56db\u5206\u4f4d\u8ddd\uff09\u3001\u673a\u5668\u5b66\u4e60 [&hellip;]","protected":false},"author":3,"featured_media":1118468,"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\/1118465"}],"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=1118465"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1118465\/revisions"}],"predecessor-version":[{"id":1118470,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1118465\/revisions\/1118470"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1118468"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1118465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1118465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1118465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}