{"id":1102560,"date":"2025-01-08T16:01:13","date_gmt":"2025-01-08T08:01:13","guid":{"rendered":""},"modified":"2025-01-08T16:01:20","modified_gmt":"2025-01-08T08:01:20","slug":"python%e5%a6%82%e4%bd%95%e6%8b%9f%e5%90%88%e5%9b%9e%e5%bd%92%e4%b8%80%e5%85%83%e6%96%b9%e7%a8%8b-2","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1102560.html","title":{"rendered":"python\u5982\u4f55\u62df\u5408\u56de\u5f52\u4e00\u5143\u65b9\u7a0b"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25064811\/0cd30aad-63f0-4ed8-ae9f-82bfe6a38d79.webp\" alt=\"python\u5982\u4f55\u62df\u5408\u56de\u5f52\u4e00\u5143\u65b9\u7a0b\" \/><\/p>\n<p><p> <strong>\u4f7f\u7528Python\u62df\u5408\u56de\u5f52\u4e00\u5143\u65b9\u7a0b\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u79cd\uff1a\u7ebf\u6027\u56de\u5f52\u3001\u4f7f\u7528scipy\u5e93\u8fdb\u884c\u6700\u5c0f\u4e8c\u4e58\u6cd5\u62df\u5408\u3001\u4f7f\u7528statsmodels\u5e93\u8fdb\u884c\u8be6\u7ec6\u7edf\u8ba1\u5206\u6790\u3002<\/strong> \u5176\u4e2d\uff0c\u6700\u5e38\u7528\u7684\u4e00\u79cd\u65b9\u6cd5\u662f\u4f7f\u7528scikit-learn\u5e93\u8fdb\u884c\u7ebf\u6027\u56de\u5f52\u3002\u4e0b\u9762\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528scikit-learn\u8fdb\u884c\u4e00\u5143\u7ebf\u6027\u56de\u5f52\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001SCIKIT-LEARN\u8fdb\u884c\u4e00\u5143\u7ebf\u6027\u56de\u5f52<\/p>\n<\/p>\n<p><p>scikit-learn\u662f\u4e00\u4e2a\u5f3a\u5927\u7684<a href=\"https:\/\/docs.pingcode.com\/ask\/59192.html\" target=\"_blank\">\u673a\u5668\u5b66\u4e60<\/a>\u5e93\uff0c\u63d0\u4f9b\u4e86\u8bb8\u591a\u65b9\u4fbf\u7684\u5de5\u5177\u6765\u8fdb\u884c\u56de\u5f52\u5206\u6790\u3002\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u5b83\u7684LinearRegression\u7c7b\u6765\u8fdb\u884c\u4e00\u5143\u7ebf\u6027\u56de\u5f52\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5scikit-learn\u5e93<\/p>\n<p>\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5b89\u88c5scikit-learn\u5e93\u3002\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-bash\">pip install scikit-learn<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5bfc\u5165\u5fc5\u8981\u7684\u5e93<\/p>\n<p>\u5728\u8fdb\u884c\u4e00\u5143\u7ebf\u6027\u56de\u5f52\u4e4b\u524d\uff0c\u6211\u4eec\u9700\u8981\u5bfc\u5165\u4e00\u4e9b\u5fc5\u8981\u7684\u5e93\uff0c\u5305\u62ecscikit-learn\u3001numpy\u548cmatplotlib\uff1a<\/li>\n<\/p>\n<\/ol>\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<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u751f\u6210\u6216\u5bfc\u5165\u6570\u636e<\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u751f\u6210\u4e00\u4e9b\u7b80\u5355\u7684\u6570\u636e\u6765\u8fdb\u884c\u6f14\u793a\uff0c\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b9e\u9645\u7684\u6570\u636e\u96c6\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u751f\u6210\u4e00\u4e9b\u6570\u636e<\/p>\n<p>np.random.seed(0)  # \u8bbe\u7f6e\u968f\u673a\u79cd\u5b50<\/p>\n<p>X = 2 * np.random.rand(100, 1)<\/p>\n<p>y = 4 + 3 * X + np.random.randn(100, 1)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"4\">\n<li>\u62df\u5408\u6a21\u578b<\/p>\n<p>\u4f7f\u7528scikit-learn\u8fdb\u884c\u4e00\u5143\u7ebf\u6027\u56de\u5f52\u975e\u5e38\u7b80\u5355\uff0c\u6211\u4eec\u53ea\u9700\u8981\u521b\u5efa\u4e00\u4e2aLinearRegression\u5bf9\u8c61\uff0c\u7136\u540e\u8c03\u7528\u5b83\u7684fit\u65b9\u6cd5\u6765\u62df\u5408\u6570\u636e\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u521b\u5efa\u7ebf\u6027\u56de\u5f52\u6a21\u578b<\/p>\n<p>lin_reg = LinearRegression()<\/p>\n<h2><strong>\u62df\u5408\u6570\u636e<\/strong><\/h2>\n<p>lin_reg.fit(X, y)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"5\">\n<li>\u67e5\u770b\u62df\u5408\u7ed3\u679c<\/p>\n<p>\u62df\u5408\u5b8c\u6210\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u67e5\u770b\u6a21\u578b\u7684\u53c2\u6570\uff0c\u5305\u62ec\u622a\u8ddd\u548c\u659c\u7387\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\">print(&quot;\u622a\u8ddd (intercept):&quot;, lin_reg.intercept_)<\/p>\n<p>print(&quot;\u659c\u7387 (slope):&quot;, lin_reg.coef_)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"6\">\n<li>\u53ef\u89c6\u5316\u7ed3\u679c<\/p>\n<p>\u6700\u540e\uff0c\u6211\u4eec\u53ef\u4ee5\u5c06\u62df\u5408\u7ed3\u679c\u53ef\u89c6\u5316\uff0c\u7ed8\u5236\u539f\u59cb\u6570\u636e\u70b9\u548c\u62df\u5408\u76f4\u7ebf\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u7ed8\u5236\u539f\u59cb\u6570\u636e\u70b9<\/p>\n<p>plt.scatter(X, y, color=&#39;blue&#39;)<\/p>\n<h2><strong>\u7ed8\u5236\u62df\u5408\u76f4\u7ebf<\/strong><\/h2>\n<p>plt.plot(X, lin_reg.predict(X), color=&#39;red&#39;)<\/p>\n<p>plt.xlabel(&quot;X&quot;)<\/p>\n<p>plt.ylabel(&quot;y&quot;)<\/p>\n<p>plt.title(&quot;\u4e00\u5143\u7ebf\u6027\u56de\u5f52&quot;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u4f7f\u7528SCIPY\u5e93\u8fdb\u884c\u6700\u5c0f\u4e8c\u4e58\u6cd5\u62df\u5408<\/p>\n<\/p>\n<p><p>scipy\u5e93\u4e2d\u7684curve_fit\u51fd\u6570\u53ef\u4ee5\u7528\u4e8e\u62df\u5408\u56de\u5f52\u65b9\u7a0b\u3002\u5b83\u9002\u7528\u4e8e\u591a\u79cd\u7c7b\u578b\u7684\u56de\u5f52\uff0c\u4e0d\u4ec5\u9650\u4e8e\u7ebf\u6027\u56de\u5f52\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5scipy\u5e93<\/p>\n<p>\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5scipy\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-bash\">pip install scipy<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5bfc\u5165\u5fc5\u8981\u7684\u5e93<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p>from scipy.optimize import curve_fit<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u5b9a\u4e49\u56de\u5f52\u6a21\u578b<\/p>\n<p>\u6211\u4eec\u9700\u8981\u5b9a\u4e49\u4e00\u4e2a\u56de\u5f52\u6a21\u578b\u51fd\u6570\uff0c\u8fd9\u91cc\u4ee5\u7ebf\u6027\u56de\u5f52\u4e3a\u4f8b\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\">def linear_model(x, a, b):<\/p>\n<p>    return a * x + b<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"4\">\n<li>\u751f\u6210\u6216\u5bfc\u5165\u6570\u636e<\/p>\n<p>\u540c\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u751f\u6210\u4e00\u4e9b\u7b80\u5355\u7684\u6570\u636e\u6765\u8fdb\u884c\u6f14\u793a\uff0c\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b9e\u9645\u7684\u6570\u636e\u96c6\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u751f\u6210\u4e00\u4e9b\u6570\u636e<\/p>\n<p>np.random.seed(0)  # \u8bbe\u7f6e\u968f\u673a\u79cd\u5b50<\/p>\n<p>X = 2 * np.random.rand(100)<\/p>\n<p>y = 4 + 3 * X + np.random.randn(100)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"5\">\n<li>\u62df\u5408\u6a21\u578b<\/p>\n<p>\u4f7f\u7528curve_fit\u51fd\u6570\u62df\u5408\u6570\u636e\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u62df\u5408\u6570\u636e<\/p>\n<p>params, params_covariance = curve_fit(linear_model, X, y)<\/p>\n<p>print(&quot;\u62df\u5408\u53c2\u6570:&quot;, params)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"6\">\n<li>\u53ef\u89c6\u5316\u7ed3\u679c<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u7ed8\u5236\u539f\u59cb\u6570\u636e\u70b9<\/p>\n<p>plt.scatter(X, y, color=&#39;blue&#39;)<\/p>\n<h2><strong>\u7ed8\u5236\u62df\u5408\u76f4\u7ebf<\/strong><\/h2>\n<p>plt.plot(X, linear_model(X, params[0], params[1]), color=&#39;red&#39;)<\/p>\n<p>plt.xlabel(&quot;X&quot;)<\/p>\n<p>plt.ylabel(&quot;y&quot;)<\/p>\n<p>plt.title(&quot;\u4e00\u5143\u7ebf\u6027\u56de\u5f52\uff08Scipy\uff09&quot;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u4f7f\u7528STATSMODELS\u5e93\u8fdb\u884c\u8be6\u7ec6\u7edf\u8ba1\u5206\u6790<\/p>\n<\/p>\n<p><p>statsmodels\u5e93\u63d0\u4f9b\u4e86\u66f4\u8be6\u7ec6\u7684\u7edf\u8ba1\u5206\u6790\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u6765\u8fdb\u884c\u56de\u5f52\u5206\u6790\u5e76\u83b7\u5f97\u8be6\u7ec6\u7684\u7edf\u8ba1\u4fe1\u606f\u3002<\/p>\n<\/p>\n<ol>\n<li>\u5b89\u88c5statsmodels\u5e93<\/p>\n<p>\u5982\u679c\u4f60\u8fd8\u6ca1\u6709\u5b89\u88c5statsmodels\u5e93\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-bash\">pip install statsmodels<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"2\">\n<li>\u5bfc\u5165\u5fc5\u8981\u7684\u5e93<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\">import numpy as np<\/p>\n<p>import statsmodels.api as sm<\/p>\n<p>import matplotlib.pyplot as plt<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"3\">\n<li>\u751f\u6210\u6216\u5bfc\u5165\u6570\u636e<\/p>\n<p>\u540c\u6837\uff0c\u6211\u4eec\u53ef\u4ee5\u751f\u6210\u4e00\u4e9b\u7b80\u5355\u7684\u6570\u636e\u6765\u8fdb\u884c\u6f14\u793a\uff0c\u5f53\u7136\u4f60\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b9e\u9645\u7684\u6570\u636e\u96c6\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u751f\u6210\u4e00\u4e9b\u6570\u636e<\/p>\n<p>np.random.seed(0)  # \u8bbe\u7f6e\u968f\u673a\u79cd\u5b50<\/p>\n<p>X = 2 * np.random.rand(100)<\/p>\n<p>y = 4 + 3 * X + np.random.randn(100)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"4\">\n<li>\u62df\u5408\u6a21\u578b<\/p>\n<p>\u4f7f\u7528statsmodels\u8fdb\u884c\u4e00\u5143\u7ebf\u6027\u56de\u5f52\uff1a<\/li>\n<\/p>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u6dfb\u52a0\u5e38\u6570\u9879<\/p>\n<p>X = sm.add_constant(X)<\/p>\n<h2><strong>\u62df\u5408\u6570\u636e<\/strong><\/h2>\n<p>model = sm.OLS(y, X).fit()<\/p>\n<p>print(model.summary())<\/p>\n<p><\/code><\/pre>\n<\/p>\n<ol start=\"5\">\n<li>\u53ef\u89c6\u5316\u7ed3\u679c<\/li>\n<\/ol>\n<p><pre><code class=\"language-python\"># \u7ed8\u5236\u539f\u59cb\u6570\u636e\u70b9<\/p>\n<p>plt.scatter(X[:, 1], y, color=&#39;blue&#39;)<\/p>\n<h2><strong>\u7ed8\u5236\u62df\u5408\u76f4\u7ebf<\/strong><\/h2>\n<p>plt.plot(X[:, 1], model.predict(X), color=&#39;red&#39;)<\/p>\n<p>plt.xlabel(&quot;X&quot;)<\/p>\n<p>plt.ylabel(&quot;y&quot;)<\/p>\n<p>plt.title(&quot;\u4e00\u5143\u7ebf\u6027\u56de\u5f52\uff08Statsmodels\uff09&quot;)<\/p>\n<p>plt.show()<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u56db\u3001\u603b\u7ed3<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u51e0\u79cd\u65b9\u6cd5\uff0c\u6211\u4eec\u53ef\u4ee5\u5728Python\u4e2d\u8f7b\u677e\u5b9e\u73b0\u4e00\u5143\u7ebf\u6027\u56de\u5f52\u3002<strong>scikit-learn\u5e93\u63d0\u4f9b\u4e86\u7b80\u5355\u6613\u7528\u7684\u63a5\u53e3\uff0c\u9002\u5408\u5feb\u901f\u8fdb\u884c\u56de\u5f52\u5206\u6790\uff1bscipy\u5e93\u9002\u5408\u8fdb\u884c\u5404\u79cd\u7c7b\u578b\u7684\u56de\u5f52\u62df\u5408\uff1bstatsmodels\u5e93\u63d0\u4f9b\u4e86\u8be6\u7ec6\u7684\u7edf\u8ba1\u4fe1\u606f\uff0c\u9002\u5408\u8fdb\u884c\u6df1\u5165\u7684\u7edf\u8ba1\u5206\u6790\u3002<\/strong> \u6839\u636e\u5177\u4f53\u9700\u6c42\u9009\u62e9\u5408\u9002\u7684\u65b9\u6cd5\uff0c\u53ef\u4ee5\u6709\u6548\u5730\u8fdb\u884c\u56de\u5f52\u5206\u6790\u5e76\u5f97\u5230\u6240\u9700\u7684\u7ed3\u679c\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u9009\u62e9\u5408\u9002\u7684\u5e93\u6765\u8fdb\u884c\u4e00\u5143\u56de\u5f52\u62df\u5408\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u6709\u591a\u4e2a\u5e93\u53ef\u4ee5\u7528\u4e8e\u8fdb\u884c\u4e00\u5143\u56de\u5f52\u62df\u5408\uff0c\u6700\u5e38\u7528\u7684\u5305\u62ecNumPy\u3001SciPy\u548cscikit-learn\u3002NumPy\u63d0\u4f9b\u4e86\u57fa\u672c\u7684\u7ebf\u6027\u4ee3\u6570\u529f\u80fd\uff0c\u53ef\u4ee5\u7528\u4e8e\u7b80\u5355\u7684\u7ebf\u6027\u56de\u5f52\uff1bSciPy\u5219\u63d0\u4f9b\u4e86\u66f4\u4e3a\u590d\u6742\u7684\u62df\u5408\u529f\u80fd\uff1b\u800cscikit-learn\u662f\u4e00\u4e2a\u5f3a\u5927\u7684\u673a\u5668\u5b66\u4e60\u5e93\uff0c\u63d0\u4f9b\u4e86\u591a\u79cd\u6a21\u578b\u548c\u5de5\u5177\uff0c\u9002\u5408\u8fdb\u884c\u66f4\u590d\u6742\u7684\u56de\u5f52\u5206\u6790\u3002\u6839\u636e\u4f60\u7684\u9700\u6c42\uff0c\u9009\u62e9\u5408\u9002\u7684\u5e93\u53ef\u4ee5\u5e2e\u52a9\u63d0\u9ad8\u62df\u5408\u6548\u679c\u548c\u6548\u7387\u3002<\/p>\n<p><strong>\u5982\u4f55\u8bc4\u4f30\u56de\u5f52\u6a21\u578b\u7684\u62df\u5408\u6548\u679c\uff1f<\/strong><br \/>\u8bc4\u4f30\u56de\u5f52\u6a21\u578b\u7684\u62df\u5408\u6548\u679c\u901a\u5e38\u53ef\u4ee5\u901a\u8fc7R\u00b2\u503c\u3001\u5747\u65b9\u8bef\u5dee\uff08MSE\uff09\u7b49\u6307\u6807\u6765\u8fdb\u884c\u3002R\u00b2\u503c\u8861\u91cf\u4e86\u6a21\u578b\u89e3\u91ca\u81ea\u53d8\u91cf\u7684\u53d8\u5f02\u7a0b\u5ea6\uff0c\u8d8a\u63a5\u8fd11\u8868\u793a\u6a21\u578b\u62df\u5408\u6548\u679c\u8d8a\u597d\u3002\u5747\u65b9\u8bef\u5dee\u5219\u662f\u5b9e\u9645\u503c\u4e0e\u9884\u6d4b\u503c\u4e4b\u95f4\u5dee\u5f02\u7684\u5e73\u65b9\u7684\u5e73\u5747\u503c\uff0c\u6570\u503c\u8d8a\u5c0f\u8868\u793a\u62df\u5408\u6548\u679c\u8d8a\u597d\u3002\u6b64\u5916\uff0c\u7ed8\u5236\u6b8b\u5dee\u56fe\u4e5f\u53ef\u4ee5\u5e2e\u52a9\u5224\u65ad\u6a21\u578b\u662f\u5426\u5b58\u5728\u7cfb\u7edf\u6027\u8bef\u5dee\u3002<\/p>\n<p><strong>\u62df\u5408\u8fc7\u7a0b\u4e2d\u9047\u5230\u5f02\u5e38\u503c\u65f6\uff0c\u5e94\u8be5\u5982\u4f55\u5904\u7406\uff1f<\/strong><br \/>\u5728\u8fdb\u884c\u4e00\u5143\u56de\u5f52\u62df\u5408\u65f6\uff0c\u5f02\u5e38\u503c\u53ef\u80fd\u4f1a\u5bf9\u6a21\u578b\u4ea7\u751f\u8f83\u5927\u7684\u5f71\u54cd\u3002\u53ef\u4ee5\u901a\u8fc7\u51e0\u79cd\u65b9\u6cd5\u6765\u5904\u7406\u5f02\u5e38\u503c\uff0c\u6bd4\u5982\u5220\u9664\u5f02\u5e38\u503c\u3001\u5bf9\u6570\u636e\u8fdb\u884c\u53d8\u6362\uff08\u5982\u5bf9\u6570\u53d8\u6362\uff09\u6216\u4f7f\u7528\u9c81\u68d2\u56de\u5f52\u65b9\u6cd5\u3002\u9c81\u68d2\u56de\u5f52\u5bf9\u5f02\u5e38\u503c\u7684\u654f\u611f\u6027\u8f83\u4f4e\uff0c\u66f4\u52a0\u9002\u5408\u5904\u7406\u542b\u6709\u566a\u58f0\u7684\u6570\u636e\u3002\u786e\u4fdd\u5728\u62df\u5408\u4e4b\u524d\u5bf9\u6570\u636e\u8fdb\u884c\u5145\u5206\u7684\u63a2\u7d22\u6027\u5206\u6790\uff0c\u4ee5\u8bc6\u522b\u548c\u5904\u7406\u8fd9\u4e9b\u5f02\u5e38\u503c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u4f7f\u7528Python\u62df\u5408\u56de\u5f52\u4e00\u5143\u65b9\u7a0b\u7684\u65b9\u6cd5\u6709\u591a\u79cd\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u51e0\u79cd\uff1a\u7ebf\u6027\u56de\u5f52\u3001\u4f7f\u7528scipy\u5e93\u8fdb\u884c\u6700\u5c0f\u4e8c\u4e58\u6cd5\u62df\u5408\u3001 [&hellip;]","protected":false},"author":3,"featured_media":1102571,"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\/1102560"}],"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=1102560"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1102560\/revisions"}],"predecessor-version":[{"id":1102575,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1102560\/revisions\/1102575"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1102571"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1102560"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1102560"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1102560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}