{"id":1958,"date":"2025-03-11T07:42:00","date_gmt":"2025-03-10T23:42:00","guid":{"rendered":"https:\/\/blog.laoyulaoyu.top\/?p=1958"},"modified":"2025-02-11T13:57:44","modified_gmt":"2025-02-11T05:57:44","slug":"python-statsmodels%ef%bc%9a%e8%82%a1%e7%a5%a8%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e5%88%86%e6%9e%90%e4%b8%8e%e9%a2%84%e6%b5%8b%e5%ae%9e%e6%88%98%e5%b7%a5%e5%85%b7%e5%88%86%e4%ba%ab","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2025\/03\/11\/python-statsmodels%ef%bc%9a%e8%82%a1%e7%a5%a8%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e5%88%86%e6%9e%90%e4%b8%8e%e9%a2%84%e6%b5%8b%e5%ae%9e%e6%88%98%e5%b7%a5%e5%85%b7%e5%88%86%e4%ba%ab\/","title":{"rendered":"Python Statsmodels\uff1a\u80a1\u7968\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u4e0e\u9884\u6d4b\u5b9e\u6218\u5de5\u5177\u5206\u4eab"},"content":{"rendered":"\n<p>\u4f5c\u8005\uff1a<a href=\"https:\/\/www.laoyulaoyu.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u8001\u4f59\u635e\u9c7c<\/a><\/p>\n\n\n\n<p><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-cyan-bluish-gray-color\">\u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002<\/mark><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/102902.png\" alt=\"\" class=\"wp-image-4244\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<pre class=\"wp-block-verse\"><strong>\u5199\u5728\u524d\u9762\u7684\u8bdd\uff1a<\/strong>Python\u4e2d\u7684Statsmodels\u53ef\u4ee5\u6781\u5927\u5730\u7b80\u5316\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u7684\u8fc7\u7a0b\uff0c<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u8fd9\u4e2a\u667a\u80fd\u5e93\u4e0d\u4ec5\u80fd\u5904\u7406ARIMA\u3001SARIMA\u3001LSTM\u7b49\u590d\u6742\u6a21\u578b\uff0c\u8fd8\u80fd\u8f7b\u677e\u8fdb\u884c\u6570\u636e\u53ef\u89c6\u5316<\/mark>\u3002\u5728\u8fd9\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u5c06\u5206\u4eab\u5982\u4f55\u5feb\u901f\u4e0a\u624b\u8fd9\u4e00\u5f3a\u5927\u7684\u5de5\u5177\uff0c\u5e76\u901a\u8fc7\u5b9e\u9645\u6848\u4f8b\u5c55\u793a\u5176\u5728\u6570\u636e\u5206\u6790\u4e2d\u7684\u5e94\u7528\u3002\u65e0\u8bba\u662f\u521d\u5b66\u8005\u8fd8\u662f\u6709\u7ecf\u9a8c\u7684\u91cf\u5316\u8001\u624b\uff0c\u90fd\u80fd\u4ece\u672c\u6587\u4e2d\u83b7\u5f97\u5b9d\u8d35\u7684\u77e5\u8bc6\uff0c\u63d0\u5347\u81ea\u5df1\u7684\u6570\u636e\u5206\u6790\u80fd\u529b\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4ec0\u4e48\u662f Statsmodels \uff1f<\/strong><\/h2>\n\n\n\n<p>Statsmodels \u662f\u4e00\u4e2a\u7528\u4e8e\u7edf\u8ba1\u5efa\u6a21\u548c\u7ecf\u6d4e\u5b66\u7684 Python \u667a\u80fd\u5e93\u3002\u5b83\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u529f\u80fd\uff0c\u5141\u8bb8\u7528\u6237\u8fdb\u884c\u6570\u636e\u5206\u6790\u3001\u4f30\u8ba1\u7edf\u8ba1\u6a21\u578b\u3001\u8fdb\u884c\u5047\u8bbe\u68c0\u9a8c\u4ee5\u53ca\u751f\u6210\u5404\u79cd\u7edf\u8ba1\u56fe\u8868\u3002<\/p>\n\n\n\n<p>Statsmodels \u7279\u522b\u9002\u5408\u4e8e\u5904\u7406\u7ebf\u6027\u56de\u5f52\u3001\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u3001\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\u7b49\u591a\u79cd\u7edf\u8ba1\u65b9\u6cd5\u3002\u540c\u65f6\u5b83\u652f\u6301\u5355\u53d8\u91cf\u548c\u591a\u53d8\u91cf\u7684\u65f6\u95f4\u5e8f\u5217\u5efa\u6a21\u3002\u5b83\u5185\u7f6e\u4e86\u5f88\u591a\u7edf\u8ba1\u68c0\u9a8c\u65b9\u6cd5\uff0c\u53ef\u4ee5\u7528\u6765\u8bc4\u4f30\u6a21\u578b\u7684\u5047\u8bbe\u548c\u6027\u80fd\u3002<\/p>\n\n\n\n<p>\u8be5\u5e93\u7684\u8bbe\u8ba1\u65e8\u5728\u4e3a\u7528\u6237\u63d0\u4f9b\u4e00\u4e2a\u7b80\u5355\u6613\u7528\u7684\u63a5\u53e3\uff0c\u540c\u65f6\u4fdd\u6301\u5f3a\u5927\u7684\u529f\u80fd\u548c\u7075\u6d3b\u6027\u3002\u800c\u5982\u679c\u4f60\u60f3\u7528 ARIMA \u6216 SARIMA \u6a21\u578b\uff0c\u5b83\u7edd\u5bf9\u662f\u9996\u9009\u3002\u5b83\u8fd8\u80fd\u4e0e pandas \u548c numpy \u65e0\u7f1d\u914d\u5408\u4f7f\u7528\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/image-33.png\" alt=\"\" class=\"wp-image-4246\"\/><\/figure>\n\n\n\n<ul id=\"bh-j9Kczn_AgSh0KeNHDHQN5\" class=\"wp-block-list\">\n<li><strong>\u7ebf\u6027\u56de\u5f52<\/strong>\uff1aStatsmodels \u63d0\u4f9b\u4e86\u591a\u79cd\u7ebf\u6027\u56de\u5f52\u6a21\u578b\u7684\u5b9e\u73b0\uff0c\u5305\u62ec\u666e\u901a\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff08OLS\uff09\u548c\u52a0\u6743\u6700\u5c0f\u4e8c\u4e58\u6cd5\uff08WLS\uff09\u3002<\/li>\n\n\n\n<li><strong>\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b<\/strong>\uff1a\u652f\u6301\u591a\u79cd\u5206\u5e03\u7684\u5e7f\u4e49\u7ebf\u6027\u6a21\u578b\uff08GLM\uff09\uff0c\u5982\u4e8c\u9879\u5206\u5e03\u3001\u6cca\u677e\u5206\u5e03\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u65f6\u95f4\u5e8f\u5217\u5206\u6790<\/strong>\uff1a\u63d0\u4f9b\u4e86\u5bf9\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u7684\u5206\u6790\u5de5\u5177\uff0c\u5305\u62ec\u81ea\u56de\u5f52\u79fb\u52a8\u5e73\u5747\u6a21\u578b\uff08ARMA\uff09\u3001\u81ea\u56de\u5f52\u79ef\u5206\u6ed1\u52a8\u5e73\u5747\u6a21\u578b\uff08ARIMA\uff09\u7b49\u3002<\/li>\n\n\n\n<li><strong>\u5047\u8bbe\u68c0\u9a8c<\/strong>\uff1aStatsmodels \u63d0\u4f9b\u4e86\u591a\u79cd\u7edf\u8ba1\u68c0\u9a8c\u65b9\u6cd5\uff0c\u5982 t \u68c0\u9a8c\u3001\u5361\u65b9\u68c0\u9a8c\u7b49\uff0c\u5e2e\u52a9\u7528\u6237\u9a8c\u8bc1\u6a21\u578b\u7684\u6709\u6548\u6027\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u8bca\u65ad<\/strong>\uff1a\u63d0\u4f9b\u4e86\u591a\u79cd\u5de5\u5177\u7528\u4e8e\u6a21\u578b\u7684\u8bca\u65ad\u548c\u8bc4\u4f30\uff0c\u5305\u62ec\u6b8b\u5dee\u5206\u6790\u548c\u591a\u91cd\u5171\u7ebf\u6027\u68c0\u6d4b\u3002<\/li>\n\n\n\n<li><strong>\u53ef\u89c6\u5316<\/strong>\uff1a\u652f\u6301\u751f\u6210\u5404\u79cd\u7edf\u8ba1\u56fe\u8868\uff0c\u5e2e\u52a9\u7528\u6237\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u548c\u6a21\u578b\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u57fa\u4e8e <strong>Statsmodels<\/strong> \u4ee3\u7801\u793a\u4f8b<\/strong><\/h2>\n\n\n\n<p>\u4e0b\u9762\u8fd9\u6bb5\u4ee3\u7801\u5c06\u5c55\u793a\u5982\u4f55\u4f7f\u7528Python\u8fdb\u884c\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u3001\u5efa\u6a21\u548c\u9884\u6d4b\u3002\u4ee3\u7801\u6db5\u76d6\u4e86\u4ece\u6570\u636e\u751f\u6210\u3001\u53ef\u89c6\u5316\u3001\u5206\u89e3\u3001\u5e73\u7a33\u6027\u68c0\u9a8c\u3001\u81ea\u76f8\u5173\u5206\u6790\u3001ARIMA\u6a21\u578b\u62df\u5408\u5230LSTM\u795e\u7ecf\u7f51\u7edc\u6a21\u578b\u7684\u6784\u5efa\u548c\u8bc4\u4f30\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.1 \u6e90\u4ee3\u7801\u4e0b\u8f7d<\/strong><\/h3>\n\n\n\n<p>\u5b8c\u6574\u6e90\u4ee3\u7801\u8bf7\u5728\u6211\u7684Google Colab\u4e2d\u76f4\u63a5\u4f7f\u7528\u548c\u4e0b\u8f7d\uff1a<br><a href=\"https:\/\/colab.research.google.com\/drive\/1AVOotPzd1zKul4GsDHeJuBWheYPXQpGT?usp=sharing\">https:\/\/colab.research.google.com\/drive\/1AVOotPzd1zKul4GsDHeJuBWheYPXQpGT?usp=sharing<\/a><br><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom statsmodels.tsa.api import SimpleExpSmoothing, Holt, ExponentialSmoothing\nfrom statsmodels.tsa.stattools import adfuller, acf, pacf\nfrom statsmodels.tsa.arima.model import ARIMA\nfrom statsmodels.tsa.seasonal import seasonal_decompose\n\n\"\"\"\nGenerate or Load Time Series Data\nSimulate a time series with trend and seasonality\n\"\"\"\n\n\"\"\"\nTime Series Decomposition\nUse seasonal_decompose to split the series into trend, seasonal, and residual components.\n\n\"\"\"\n\n\"\"\"\nCheck for Stationarity\nUse the Augmented Dickey-Fuller (ADF) test to assess stationarity.\n\"\"\"\n\n\"\"\"\nAutocorrelation and Partial Autocorrelation\nVisualize the ACF and PACF to determine lag dependencies.\n\"\"\"\n\n\"\"\"\nFit an ARIMA Model\nFit an ARIMA model to the data for forecasting.\n\"\"\"\n\n\"\"\"\nTensorflow (Keras) using an LSTM model\n\n\"\"\"\n\n# Prepare Data for LSTM\nscaler = MinMaxScaler()\ndf&#91;\"value\"] = scaler.fit_transform(df&#91;\"value\"].values.reshape(-1, 1))\n\n# Plot the Results\nplt.figure(figsize=(12, 8))\nplt.plot(df.index, scaler.inverse_transform(df&#91;\"value\"].values.reshape(-1, 1)), label=\"Actual Data\", color=\"Blue\")\ntrain_index = df.index&#91;lag:train_size + lag]\nplt.plot(train_index, train_predictions_inverse, label=\"Training Predictions\", color=\"Orange\")\ntest_index = df.index&#91;train_size + lag:]\nplt.plot(test_index, y_test_inverse, label=\"Hold-Out (True Values)\", color=\"Green\")\nplt.plot(test_index, y_pred_lstm_inverse, label=\"Testing Predictions\", color=\"Red\")\nplt.title(f'LSTM Forecast. MAPE: {mape:.3%}')\nplt.xlabel(\"Date\")\nplt.ylabel(\"Value\")\nplt.legend()\nplt.grid()\nplt.savefig(\"LSTM_forecast_with_holdout.png\")\nplt.show()<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.2 \u4ee3\u7801\u8be6\u6790<\/strong><\/h3>\n\n\n\n<p>\u4ee5\u4e0b\u662f\u4ee3\u7801\u7684\u8be6\u7ec6\u5206\u6790\u548c\u603b\u7ed3\uff1a<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>1.&nbsp;\u6570\u636e\u751f\u6210\u4e0e\u53ef\u89c6\u5316<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/image-34.png\" alt=\"\" class=\"wp-image-4247\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u751f\u6210<\/strong>\uff1a\u4ee3\u7801\u9996\u5148\u751f\u6210\u4e86\u4e00\u4e2a\u6a21\u62df\u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u5305\u542b\u8d8b\u52bf\u3001\u5b63\u8282\u6027\u548c\u566a\u58f0\u6210\u5206\u3002\u8d8b\u52bf\u662f\u7ebf\u6027\u7684\uff0c\u5b63\u8282\u6027\u662f\u901a\u8fc7\u6b63\u5f26\u51fd\u6570\u751f\u6210\u7684\uff0c\u566a\u58f0\u5219\u662f\u6b63\u6001\u5206\u5e03\u7684\u968f\u673a\u6570\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u5206\u5272<\/strong>\uff1a\u6570\u636e\u88ab\u5206\u4e3a\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6\uff08hold-out\u96c6\uff09\uff0c\u6d4b\u8bd5\u96c6\u5305\u542b\u6700\u540e30\u5929\u7684\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u53ef\u89c6\u5316<\/strong>\uff1a\u4f7f\u7528<code>matplotlib<\/code>\u7ed8\u5236\u4e86\u5b8c\u6574\u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u5e76\u7528\u4e0d\u540c\u989c\u8272\u533a\u5206\u8bad\u7ec3\u96c6\u548c\u6d4b\u8bd5\u96c6\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong>\uff1a\u8fd9\u90e8\u5206\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u751f\u6210\u6a21\u62df\u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u5e76\u901a\u8fc7\u53ef\u89c6\u5316\u624b\u6bb5\u76f4\u89c2\u5730\u5c55\u793a\u6570\u636e\u7684\u8d8b\u52bf\u548c\u5b63\u8282\u6027\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>2.&nbsp;\u65f6\u95f4\u5e8f\u5217\u5206\u89e3<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/image-35.png\" alt=\"\" class=\"wp-image-4248\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u5206\u89e3<\/strong>\uff1a\u4f7f\u7528<code>seasonal_decompose<\/code>\u51fd\u6570\u5c06\u65f6\u95f4\u5e8f\u5217\u5206\u89e3\u4e3a\u8d8b\u52bf\u3001\u5b63\u8282\u6027\u548c\u6b8b\u5dee\u6210\u5206\u3002\u5206\u89e3\u6a21\u578b\u9009\u62e9\u7684\u662f\u52a0\u6cd5\u6a21\u578b\uff08<code>model=\"additive\"<\/code>\uff09\uff0c\u5468\u671f\u4e3a30\u5929\u3002<\/li>\n\n\n\n<li><strong>\u53ef\u89c6\u5316<\/strong>\uff1a\u7ed8\u5236\u4e86\u5206\u89e3\u540e\u7684\u5404\u4e2a\u6210\u5206\uff08\u8d8b\u52bf\u3001\u5b63\u8282\u6027\u3001\u6b8b\u5dee\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong>\uff1a\u65f6\u95f4\u5e8f\u5217\u5206\u89e3\u6709\u52a9\u4e8e\u7406\u89e3\u6570\u636e\u7684\u7ed3\u6784\uff0c\u7279\u522b\u662f\u8d8b\u52bf\u548c\u5b63\u8282\u6027\u6210\u5206\u3002\u8fd9\u5bf9\u4e8e\u540e\u7eed\u7684\u5efa\u6a21\u548c\u9884\u6d4b\u975e\u5e38\u91cd\u8981\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>3.&nbsp;\u5e73\u7a33\u6027\u68c0\u9a8c<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ADF\u68c0\u9a8c<\/strong>\uff1a\u4f7f\u7528Augmented Dickey-Fuller (ADF) \u68c0\u9a8c\u6765\u68c0\u67e5\u65f6\u95f4\u5e8f\u5217\u7684\u5e73\u7a33\u6027\u3002ADF\u68c0\u9a8c\u7684\u96f6\u5047\u8bbe\u662f\u65f6\u95f4\u5e8f\u5217\u662f\u975e\u5e73\u7a33\u7684\u3002<\/li>\n\n\n\n<li><strong>\u7ed3\u679c\u89e3\u91ca<\/strong>\uff1a\u6839\u636eADF\u68c0\u9a8c\u7684p\u503c\u5224\u65ad\u65f6\u95f4\u5e8f\u5217\u662f\u5426\u5e73\u7a33\u3002\u5982\u679cp\u503c\u5927\u4e8e0.05\uff0c\u5219\u8ba4\u4e3a\u65f6\u95f4\u5e8f\u5217\u662f\u975e\u5e73\u7a33\u7684\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong>\uff1a\u5e73\u7a33\u6027\u662f\u8bb8\u591a\u65f6\u95f4\u5e8f\u5217\u6a21\u578b\uff08\u5982ARIMA\uff09\u7684\u524d\u63d0\u6761\u4ef6\u3002ADF\u68c0\u9a8c\u5e2e\u52a9\u786e\u5b9a\u662f\u5426\u9700\u8981\u5dee\u5206\u6216\u5176\u4ed6\u8f6c\u6362\u6765\u4f7f\u5e8f\u5217\u5e73\u7a33\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>4.&nbsp;\u81ea\u76f8\u5173\u548c\u504f\u81ea\u76f8\u5173\u5206\u6790<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/image-36.png\" alt=\"\" class=\"wp-image-4249\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>ACF\u548cPACF\u56fe<\/strong>\uff1a\u7ed8\u5236\u4e86\u81ea\u76f8\u5173\u51fd\u6570\uff08ACF\uff09\u548c\u504f\u81ea\u76f8\u5173\u51fd\u6570\uff08PACF\uff09\u56fe\uff0c\u7528\u4e8e\u5206\u6790\u65f6\u95f4\u5e8f\u5217\u7684\u81ea\u76f8\u5173\u7ed3\u6784\u3002<\/li>\n\n\n\n<li><strong>\u6ede\u540e\u9009\u62e9<\/strong>\uff1aACF\u548cPACF\u56fe\u53ef\u4ee5\u5e2e\u52a9\u786e\u5b9aARIMA\u6a21\u578b\u4e2d\u7684\u6ede\u540e\u9636\u6570\uff08p\u548cq\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong>\uff1aACF\u548cPACF\u56fe\u662f\u9009\u62e9ARIMA\u6a21\u578b\u53c2\u6570\u7684\u91cd\u8981\u5de5\u5177\uff0c\u80fd\u591f\u5e2e\u52a9\u8bc6\u522b\u65f6\u95f4\u5e8f\u5217\u4e2d\u7684\u81ea\u76f8\u5173\u548c\u504f\u81ea\u76f8\u5173\u6a21\u5f0f\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>5.&nbsp;ARIMA\u6a21\u578b\u62df\u5408<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/image-37.png\" alt=\"\" class=\"wp-image-4250\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6a21\u578b\u62df\u5408<\/strong>\uff1a\u4f7f\u7528ARIMA(2,1,2)\u6a21\u578b\u62df\u5408\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002ARIMA\u6a21\u578b\u7684\u53c2\u6570\u4e3a(p=2, d=1, q=2)\uff0c\u5176\u4e2dd=1\u8868\u793a\u5bf9\u6570\u636e\u8fdb\u884c\u4e00\u9636\u5dee\u5206\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u8bca\u65ad<\/strong>\uff1a\u7ed8\u5236\u4e86\u6b8b\u5dee\u56fe\uff0c\u5305\u62ec\u6b8b\u5dee\u5206\u5e03\u3001QQ\u56fe\u3001\u81ea\u76f8\u5173\u56fe\u7b49\uff0c\u7528\u4e8e\u8bc4\u4f30\u6a21\u578b\u7684\u62df\u5408\u6548\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong>\uff1aARIMA\u6a21\u578b\u662f\u7ecf\u5178\u7684\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u6a21\u578b\uff0c\u9002\u7528\u4e8e\u7ebf\u6027\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002\u6a21\u578b\u8bca\u65ad\u56fe\u53ef\u4ee5\u5e2e\u52a9\u8bc4\u4f30\u6a21\u578b\u7684\u6b8b\u5dee\u662f\u5426\u7b26\u5408\u767d\u566a\u58f0\u5047\u8bbe\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>6.&nbsp;LSTM\u795e\u7ecf\u7f51\u7edc\u6a21\u578b<\/strong><\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/image-38.png\" alt=\"\" class=\"wp-image-4251\"\/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u9884\u5904\u7406<\/strong>\uff1a\u4f7f\u7528<code>MinMaxScaler<\/code>\u5bf9\u6570\u636e\u8fdb\u884c\u5f52\u4e00\u5316\u5904\u7406\uff0c\u5e76\u5c06\u6570\u636e\u8f6c\u6362\u4e3a\u9002\u5408LSTM\u6a21\u578b\u7684\u683c\u5f0f\uff08\u5373\u5e26\u6709\u65f6\u95f4\u6ede\u540e\u7684\u7279\u5f81\uff09\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u6784\u5efa<\/strong>\uff1a\u6784\u5efa\u4e86\u4e00\u4e2a\u7b80\u5355\u7684LSTM\u6a21\u578b\uff0c\u5305\u542b\u4e00\u4e2aLSTM\u5c42\u548c\u4e00\u4e2a\u5168\u8fde\u63a5\u5c42\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u8bad\u7ec3\u4e0e\u9884\u6d4b<\/strong>\uff1a\u6a21\u578b\u5728\u8bad\u7ec3\u96c6\u4e0a\u8fdb\u884c\u8bad\u7ec3\uff0c\u5e76\u5728\u6d4b\u8bd5\u96c6\u4e0a\u8fdb\u884c\u9884\u6d4b\u3002\u4f7f\u7528\u5747\u65b9\u8bef\u5dee\uff08MSE\uff09\u4f5c\u4e3a\u635f\u5931\u51fd\u6570\uff0cAdam\u4f18\u5316\u5668\u8fdb\u884c\u4f18\u5316\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u8bc4\u4f30<\/strong>\uff1a\u8ba1\u7b97\u4e86\u6d4b\u8bd5\u96c6\u4e0a\u7684\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee\uff08MAPE\uff09\uff0c\u5e76\u7ed8\u5236\u4e86\u5b9e\u9645\u503c\u4e0e\u9884\u6d4b\u503c\u7684\u5bf9\u6bd4\u56fe\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>\u603b\u7ed3<\/strong>\uff1aLSTM\u662f\u4e00\u79cd\u9002\u7528\u4e8e\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u7684\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff0c\u7279\u522b\u9002\u5408\u5904\u7406\u975e\u7ebf\u6027\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u3002\u901a\u8fc7LSTM\u6a21\u578b\uff0c\u53ef\u4ee5\u6355\u6349\u5230\u65f6\u95f4\u5e8f\u5217\u4e2d\u7684\u590d\u6742\u6a21\u5f0f\uff0c\u4f46\u9700\u8981\u66f4\u591a\u7684\u6570\u636e\u548c\u8ba1\u7b97\u8d44\u6e90\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2.3 \u4ee3\u7801\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u6bb5\u4ee3\u7801\u5c55\u793a\u4e86\u4ece\u6570\u636e\u751f\u6210\u5230\u6a21\u578b\u9884\u6d4b\u7684\u5b8c\u6574\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u6d41\u7a0b\uff0c\u6db5\u76d6\u4e86\u4f20\u7edf\u7edf\u8ba1\u6a21\u578b\uff08ARIMA\uff09\u548c\u73b0\u4ee3\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\uff08LSTM\uff09\u3002\u6211\u5c3d\u91cf\u8ba9\u4ee3\u7801\u7ed3\u6784\u6e05\u6670\uff0c\u9002\u5408\u521d\u5b66\u8005\u5b66\u4e60\u548c\u53c2\u8003\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u751f\u6210\u4e0e\u53ef\u89c6\u5316<\/strong>\uff1a\u4ee3\u7801\u5c55\u793a\u4e86\u5982\u4f55\u751f\u6210\u6a21\u62df\u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u5e76\u901a\u8fc7\u53ef\u89c6\u5316\u624b\u6bb5\u5c55\u793a\u6570\u636e\u7684\u8d8b\u52bf\u548c\u5b63\u8282\u6027\u3002<\/li>\n\n\n\n<li><strong>\u65f6\u95f4\u5e8f\u5217\u5206\u89e3<\/strong>\uff1a\u901a\u8fc7\u5206\u89e3\u65f6\u95f4\u5e8f\u5217\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u6570\u636e\u7684\u7ed3\u6784\u3002<\/li>\n\n\n\n<li><strong>\u5e73\u7a33\u6027\u68c0\u9a8c<\/strong>\uff1aADF\u68c0\u9a8c\u5e2e\u52a9\u786e\u5b9a\u65f6\u95f4\u5e8f\u5217\u662f\u5426\u5e73\u7a33\uff0c\u8fd9\u5bf9\u4e8e\u9009\u62e9\u5408\u9002\u7684\u6a21\u578b\u975e\u5e38\u91cd\u8981\u3002<\/li>\n\n\n\n<li><strong>\u81ea\u76f8\u5173\u5206\u6790<\/strong>\uff1aACF\u548cPACF\u56fe\u5e2e\u52a9\u786e\u5b9aARIMA\u6a21\u578b\u7684\u53c2\u6570\u3002<\/li>\n\n\n\n<li><strong>ARIMA\u6a21\u578b<\/strong>\uff1aARIMA\u6a21\u578b\u9002\u7528\u4e8e\u7ebf\u6027\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u6a21\u578b\u8bca\u65ad\u56fe\u5e2e\u52a9\u8bc4\u4f30\u6a21\u578b\u7684\u62df\u5408\u6548\u679c\u3002<\/li>\n\n\n\n<li><strong>LSTM\u6a21\u578b<\/strong>\uff1aLSTM\u6a21\u578b\u9002\u7528\u4e8e\u975e\u7ebf\u6027\u65f6\u95f4\u5e8f\u5217\u6570\u636e\uff0c\u80fd\u591f\u6355\u6349\u590d\u6742\u7684\u6a21\u5f0f\uff0c\u4f46\u9700\u8981\u66f4\u591a\u7684\u6570\u636e\u548c\u8ba1\u7b97\u8d44\u6e90\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u4e09\u3001\u5e94\u7528\u4e8e\u80a1\u7968<strong>\u7684<\/strong>\u5206\u6790\u5de5\u5177<\/strong><\/h2>\n\n\n\n<p>\u4e0a\u9762\u8fd9\u6bb5\u4ee3\u7801\u6211\u8fdb\u884c\u6539\u9020\u5e76\u5e94\u7528\u5230\u7279\u65af\u62c9\uff08Tesla\uff09\u80a1\u7968\u5206\u6790\u4e0a\uff0c\u5e76\u6839\u636e\u80a1\u7968\u6570\u636e\u7684\u7279\u70b9\u8fdb\u884c\u4e00\u4e9b\u8c03\u6574\u548c\u4f18\u5316\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/\u4e0b\u8f7d-2.png\" alt=\"\" class=\"wp-image-4253\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2025\/02\/\u5fae\u4fe1\u56fe\u7247_20250211123803.png\" alt=\"\" class=\"wp-image-4252\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.1 \u4ee3\u7801\u8bf4\u660e<\/strong><\/h3>\n\n\n\n<ul start=\"1\" class=\"wp-block-list\">\n<li><strong>\u6570\u636e\u83b7\u53d6<\/strong>\uff1a\u4f7f\u7528<code>yfinance<\/code>\u4e0b\u8f7d\u7279\u65af\u62c9\u80a1\u7968\u6570\u636e\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u9884\u5904\u7406<\/strong>\uff1a\u5904\u7406\u7f3a\u5931\u503c\u3001\u5bf9\u6570\u8f6c\u6362\u548c\u5dee\u5206\u3002<\/li>\n\n\n\n<li><strong>\u53ef\u89c6\u5316<\/strong>\uff1a\u7ed8\u5236\u80a1\u7968\u4ef7\u683c\u3001\u65f6\u95f4\u5e8f\u5217\u5206\u89e3\u56fe\u3001ACF\u548cPACF\u56fe\u3002<\/li>\n\n\n\n<li><strong>\u5e73\u7a33\u6027\u68c0\u9a8c<\/strong>\uff1a\u4f7f\u7528ADF\u68c0\u9a8c\u68c0\u67e5\u6570\u636e\u662f\u5426\u5e73\u7a33\u3002<\/li>\n\n\n\n<li><strong>ARIMA\u6a21\u578b<\/strong>\uff1a\u62df\u5408ARIMA\u6a21\u578b\u5e76\u8f93\u51fa\u8bca\u65ad\u56fe\u3002<\/li>\n\n\n\n<li><strong>LSTM\u6a21\u578b<\/strong>\uff1a\u6784\u5efa\u3001\u8bad\u7ec3\u548c\u8bc4\u4f30LSTM\u6a21\u578b\uff0c\u5e76\u53ef\u89c6\u5316\u9884\u6d4b\u7ed3\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.2 \u6ce8\u610f\u4e8b\u9879<\/strong><\/h3>\n\n\n\n<p>\u8fd9\u6bb5\u4ee3\u7801\u53ef\u4ee5\u5e94\u7528\u4e8e\u7279\u65af\u62c9\u80a1\u7968\u5206\u6790\uff0c\u4f46\u9700\u8981\u6839\u636e\u80a1\u7968\u6570\u636e\u7684\u7279\u70b9\u8fdb\u884c\u8c03\u6574\u3002ARIMA\u6a21\u578b\u9002\u5408\u6355\u6349\u7ebf\u6027\u8d8b\u52bf\uff0c\u800cLSTM\u6a21\u578b\u9002\u5408\u6355\u6349\u975e\u7ebf\u6027\u6a21\u5f0f\u3002\u901a\u8fc7\u7ed3\u5408\u4e24\u79cd\u6a21\u578b\uff0c\u53ef\u4ee5\u66f4\u597d\u5730\u9884\u6d4b\u80a1\u7968\u4ef7\u683c\u3002\u4e0d\u8fc7\uff0c\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u80a1\u7968\u5e02\u573a\u5177\u6709\u9ad8\u5ea6\u968f\u673a\u6027\uff0c\u6a21\u578b\u7684\u9884\u6d4b\u7ed3\u679c\u4ec5\u4f9b\u53c2\u8003\uff0c\u5b9e\u9645\u6295\u8d44\u51b3\u7b56\u9700\u8c28\u614e\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u80a1\u7968\u5e02\u573a\u7684\u968f\u673a\u6027<\/strong>\uff1a\u80a1\u7968\u4ef7\u683c\u53d7\u591a\u79cd\u56e0\u7d20\u5f71\u54cd\uff08\u5982\u65b0\u95fb\u3001\u653f\u7b56\u3001\u5e02\u573a\u60c5\u7eea\u7b49\uff09\uff0c\u4f20\u7edf\u65f6\u95f4\u5e8f\u5217\u6a21\u578b\u53ef\u80fd\u96be\u4ee5\u6355\u6349\u8fd9\u4e9b\u975e\u7ebf\u6027\u5173\u7cfb\u3002<\/li>\n\n\n\n<li><strong>\u6a21\u578b\u9009\u62e9<\/strong>\uff1aARIMA\u9002\u5408\u7ebf\u6027\u5173\u7cfb\uff0c\u800cLSTM\u9002\u5408\u975e\u7ebf\u6027\u5173\u7cfb\u3002\u53ef\u4ee5\u5c1d\u8bd5\u7ed3\u5408\u4e24\u79cd\u6a21\u578b\u7684\u4f18\u70b9\u3002<\/li>\n\n\n\n<li><strong>\u7279\u5f81\u5de5\u7a0b<\/strong>\uff1a\u9664\u4e86\u6536\u76d8\u4ef7\uff0c\u8fd8\u53ef\u4ee5\u52a0\u5165\u5176\u4ed6\u7279\u5f81\uff08\u5982\u6210\u4ea4\u91cf\u3001\u6280\u672f\u6307\u6807\u7b49\uff09\u6765\u63d0\u9ad8\u6a21\u578b\u6027\u80fd\u3002<\/li>\n\n\n\n<li><strong>\u8fc7\u62df\u5408\u95ee\u9898<\/strong>\uff1aLSTM\u6a21\u578b\u5bb9\u6613\u8fc7\u62df\u5408\uff0c\u5c24\u5176\u662f\u5728\u6570\u636e\u91cf\u8f83\u5c11\u65f6\u3002\u53ef\u4ee5\u901a\u8fc7\u6b63\u5219\u5316\u3001Dropout\u7b49\u65b9\u6cd5\u7f13\u89e3\u3002\u5982\u679c\u6570\u636e\u91cf\u8f83\u5927\uff0cLSTM\u6a21\u578b\u7684\u8bad\u7ec3\u65f6\u95f4\u53ef\u80fd\u8f83\u957f\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3.3 \u5de5\u5177\u4e0b\u8f7d<\/strong><\/h3>\n\n\n\n<p><strong>\u80a1\u7968\u5206\u6790\u5de5\u5177<\/strong>\u8bf7\u5728\u6211\u7684Google Colab\u4e2d\u7533\u8bf7\u4f7f\u7528\u548c\u4e0b\u8f7d\uff1a<br><a href=\"https:\/\/colab.research.google.com\/drive\/19GZKiNyPSHwFSWNIYsWVlsMm7Gf7lTut?usp=sharing\">https:\/\/colab.research.google.com\/drive\/19GZKiNyPSHwFSWNIYsWVlsMm7Gf7lTut?usp=sharing<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u56db\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h2>\n\n\n\n<p>\u672c\u6587\u4ecb\u7ecd\u4e86\u5982\u4f55\u4f7f\u7528 Python \u4e2d\u7684&nbsp;<code>statsmodels<\/code>&nbsp;\u5e93\u8fdb\u884c\u65f6\u95f4\u5e8f\u5217\u5206\u6790\uff0c\u5e76\u901a\u8fc7\u6a21\u62df\u6570\u636e\u548c\u5b9e\u9645\u6848\u4f8b\u5c55\u793a\u4e86\u65f6\u95f4\u5e8f\u5217\u5206\u89e3\u3001\u68c0\u9a8c\u5e73\u7a33\u6027\u3001\u81ea\u76f8\u5173\u4e0e\u90e8\u5206\u81ea\u76f8\u5173\u5206\u6790\u3001ARIMA \u6a21\u578b\u548c LSTM \u6a21\u578b\u7684\u5e94\u7528\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>statsmodels<\/code>&nbsp;\u662f\u4e00\u5957\u5f3a\u5927\u7684\u7edf\u8ba1\u5efa\u6a21\u5de5\u5177\uff0c\u5bf9\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u652f\u6301\u3002<\/li>\n\n\n\n<li>\u65f6\u95f4\u5e8f\u5217\u5206\u89e3\u6709\u52a9\u4e8e\u7406\u89e3\u6570\u636e\u4e2d\u7684\u8d8b\u52bf\u3001\u5b63\u8282\u6027\u548c\u6b8b\u5dee\u6210\u5206\u3002<\/li>\n\n\n\n<li>\u5e73\u7a33\u6027\u68c0\u9a8c\u662f\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u7684\u5173\u952e\u6b65\u9aa4\uff0c\u53ef\u4ee5\u901a\u8fc7 ADF \u68c0\u9a8c\u6765\u8fdb\u884c\u3002<\/li>\n\n\n\n<li>ARIMA \u6a21\u578b\u662f\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u7684\u5e38\u7528\u65b9\u6cd5\uff0c\u4f46\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\u53ef\u80fd\u9700\u8981\u901a\u8fc7\u8c03\u6574\u6a21\u578b\u53c2\u6570\u6216\u4f7f\u7528\u5176\u4ed6\u6a21\u578b\u6765\u63d0\u9ad8\u9884\u6d4b\u51c6\u786e\u6027\u3002<\/li>\n\n\n\n<li>LSTM \u6a21\u578b\u5728\u5904\u7406\u590d\u6742\u7684\u65f6\u95f4\u5e8f\u5217\u6570\u636e\u65f6\uff0c\u901a\u5e38\u80fd\u63d0\u4f9b\u4e0e\u4f20\u7edf\u7edf\u8ba1\u65b9\u6cd5\u76f8\u6bd4\u66f4\u597d\u7684\u9884\u6d4b\u7ed3\u679c\u3002<\/li>\n\n\n\n<li>\u5b9e\u9645\u6848\u4f8b\u8868\u660e\uff0c\u4e0d\u540c\u7684\u65f6\u95f4\u5e8f\u5217\u6a21\u578b\u9002\u7528\u4e8e\u4e0d\u540c\u7684\u6570\u636e\u7279\u6027\uff0c\u9009\u62e9\u5408\u9002\u7684\u6a21\u578b\u5bf9\u4e8e\u83b7\u5f97\u51c6\u786e\u9884\u6d4b\u81f3\u5173\u91cd\u8981\u3002<\/li>\n<\/ul>\n\n\n\n<p><\/p>\n\n\n\n<p><em>\u611f\u8c22\u60a8\u9605\u8bfb\u5230\u6700\u540e\uff0c\u5e0c\u671b\u8fd9\u7bc7\u6587\u7ae0\u4e3a\u60a8\u5e26\u6765\u4e86\u65b0\u7684\u542f\u53d1\u548c\u5b9e\u7528\u7684\u77e5\u8bc6\uff01\u5982\u679c\u89c9\u5f97\u6709\u5e2e\u52a9\uff0c\u8bf7\u4e0d\u541d\u70b9\u8d5e\u548c\u5206\u4eab\uff0c\u60a8\u7684\u652f\u6301\u662f\u6211\u6301\u7eed\u521b\u4f5c\u7684\u52a8\u529b\u3002\u795d\u60a8\u6295\u8d44\u987a\u5229\uff0c\u6536\u76ca\u957f\u8679\uff01\u5982\u679c\u5bf9\u6587\u4e2d\u5185\u5bb9\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u6b22\u8fce\u7559\u8a00\uff0c\u6211\u4f1a\u5c3d\u5feb\u56de\u590d\uff01<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"has-text-align-center\" id=\"a1c6\">\u672c\u6587\u5185\u5bb9\u4ec5\u9650\u6280\u672f\u63a2\u8ba8\u548c\u5b66\u4e60\uff0c\u4e0d\u6784\u6210\u4efb\u4f55\u6295\u8d44\u5efa\u8bae\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f5c\u8005\uff1a\u8001\u4f59\u635e\u9c7c \u539f\u521b\u4e0d\u6613\uff0c\u8f6c\u8f7d\u8bf7\u6807\u660e\u51fa\u5904\u53ca\u539f\u4f5c\u8005\u3002&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/laoyulaoyu.com\/index.php\/2025\/03\/11\/python-statsmodels%ef%bc%9a%e8%82%a1%e7%a5%a8%e6%97%b6%e9%97%b4%e5%ba%8f%e5%88%97%e5%88%86%e6%9e%90%e4%b8%8e%e9%a2%84%e6%b5%8b%e5%ae%9e%e6%88%98%e5%b7%a5%e5%85%b7%e5%88%86%e4%ba%ab\/\">Continue reading<span class=\"screen-reader-text\">Python Statsmodels\uff1a\u80a1\u7968\u65f6\u95f4\u5e8f\u5217\u5206\u6790\u4e0e\u9884\u6d4b\u5b9e\u6218\u5de5\u5177\u5206\u4eab<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,6],"class_list":["post-1958","post","type-post","status-publish","format-standard","hentry","category-aiinvest","tag-ai","tag-6","entry"],"_links":{"self":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1958","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/comments?post=1958"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1958\/revisions"}],"predecessor-version":[{"id":1959,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1958\/revisions\/1959"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=1958"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=1958"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=1958"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}