{"id":1713,"date":"2024-12-14T08:00:00","date_gmt":"2024-12-14T00:00:00","guid":{"rendered":"https:\/\/blog.laoyulaoyu.top\/?p=1713"},"modified":"2024-11-20T17:00:37","modified_gmt":"2024-11-20T09:00:37","slug":"%e6%8f%ad%e7%a7%98%ef%bc%9a%e5%a6%82%e4%bd%95%e7%94%a8%e6%80%9d%e6%83%b3%e5%a2%9e%e5%bc%ba%e5%9e%8blstm%e7%bd%91%e7%bb%9c%e7%b2%be%e5%87%86%e9%a2%84%e6%b5%8b%e8%82%a1%e4%bb%b7%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/laoyulaoyu.com\/index.php\/2024\/12\/14\/%e6%8f%ad%e7%a7%98%ef%bc%9a%e5%a6%82%e4%bd%95%e7%94%a8%e6%80%9d%e6%83%b3%e5%a2%9e%e5%bc%ba%e5%9e%8blstm%e7%bd%91%e7%bb%9c%e7%b2%be%e5%87%86%e9%a2%84%e6%b5%8b%e8%82%a1%e4%bb%b7%ef%bc%9f\/","title":{"rendered":"\u63ed\u79d8\uff1a\u5982\u4f55\u7528\u601d\u60f3\u589e\u5f3a\u578bLSTM\u7f51\u7edc\u7cbe\u51c6\u9884\u6d4b\u80a1\u4ef7\uff1f"},"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-large\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/111405-1024x591.png\" alt=\"\" class=\"wp-image-3026\"\/><\/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>\u672c\u6587\u4ecb\u7ecd\u4e86<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-vivid-cyan-blue-color\">\u4e00\u79cd\u521b\u65b0\u6a21\u578b\u2014\u2014\u201c\u601d\u60f3\u589e\u5f3a\u578b LSTM\u201d\uff0c\u7528\u4e8e\u63d0\u5347\u80a1\u4ef7\u9884\u6d4b\u7684\u51c6\u786e\u6027<\/mark>\u3002\u8be5\u6a21\u578b\u5728\u6bcf\u4e2a\u65f6\u95f4\u6b65\u751f\u6210\u62bd\u8c61\u7684\u201c\u601d\u60f3\u201d\u8868\u5f81\uff0c\u4e0e LSTM \u8f93\u51fa\u7ed3\u5408\uff0c\u6355\u6349\u80a1\u4ef7\u5e8f\u5217\u7684\u590d\u6742\u6a21\u5f0f\u3002\u901a\u8fc7\u5b9e\u9a8c\u8bc1\u660e\uff0c\u8fd9\u79cd\u65b9\u6cd5\u5728\u80a1\u4ef7\u9884\u6d4b\u4e0a\u4f18\u4e8e\u4f20\u7edf LSTM\uff0c\u8fd9\u4e3a\u60a8\u7684\u91d1\u878d\u6295\u8d44\u63d0\u4f9b\u4e86\u4e00\u79cd\u65b0\u7684\u6280\u672f\u5de5\u5177\uff0c\u6211\u4f1a\u5728\u6587\u672b\u9644\u4e0a\u5168\u90e8\u6e90\u7801\u548cGoogle Colab\u7b14\u8bb0\u672c\u8fd0\u884c\u73af\u5883\u5730\u5740\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u4e0d\u59a8\u4e00\u63a2\u7a76\u7adf\u3002<\/pre>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u4e00\u3001\u4e86\u89e3 LSTM \u7f51\u7edc<\/strong><\/h3>\n\n\n\n<p>\u957f\u77ed\u671f\u8bb0\u5fc6\uff08LSTM\uff09\u7f51\u7edc\u662f\u4e00\u79cd\u9012\u5f52\u795e\u7ecf\u7f51\u7edc\uff08RNN\uff09\uff0c\u65e8\u5728\u6355\u6349\u8fde\u7eed\u6570\u636e\u4e2d\u7684\u957f\u671f\u4f9d\u8d56\u5173\u7cfb\u3002\u4e0e\u6807\u51c6 RNN \u4e0d\u540c\u7684\u662f\uff0cLSTM \u53ef\u4ee5\u9009\u62e9\u6027\u5730\u8bb0\u5fc6\u6216\u9057\u5fd8\u957f\u5e8f\u5217\u4e2d\u7684\u4fe1\u606f\uff0c\u8fd9\u4f7f\u5176\u5bf9\u80a1\u7968\u4ef7\u683c\u9884\u6d4b\u7b49\u65f6\u95f4\u5e8f\u5217\u9884\u6d4b\u4efb\u52a1\u5c24\u4e3a\u6709\u6548\u3002<\/p>\n\n\n\n<p><strong>1. LSTM \u7f51\u7edc\u7684\u6838\u5fc3\u5728\u4e8e\u5176\u5355\u5143\u7ed3\u6784<\/strong>\uff0c\u4e3b\u8981\u7531\u4ee5\u4e0b\u51e0\u4e2a\u90e8\u5206\u7ec4\u6210\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-97.png\" alt=\"\" class=\"wp-image-3028\"\/><\/figure>\n<\/div>\n\n\n<p>LSTM \u5229\u7528\u8fd9\u4e9b\u65b9\u7a0b\u66f4\u65b0\u5176\u5355\u5143\u72b6\u6001\uff0c\u5e76\u5728\u6bcf\u4e2a\u65f6\u95f4\u6b65\u4ea7\u751f\u8f93\u51fa\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>f_t = \u03c3(W_f \u00b7 &#91;h_(t-1), x_t] + b_f) i_t = \u03c3(W_i \u00b7 &#91;h_(t-1), x_t] + b_i) o_t = \u03c3(W_o \u00b7 &#91;h_(t-1), x_t] + b_o) c\u0303_t = tanh(W_c \u00b7 &#91;h_(t-1), x_t] + b_c) c_t = f_t * c_(t-1) + i_t * c\u0303_t h_t = o_t * tanh(c_t)\nf_t = \u03c3(W_f - &#91;h_(t-1), x_t] + b_f) i_t = \u03c3(W_i - &#91;h_(t-1), x_t] + b_i) o_t = \u03c3(W_o - &#91;h_(t-1)\u3001x_t] + b_o) c\u0303_t = tanh(W_c - &#91;h_(t-1), x_t] + b_c) c_t = f_t * c_(t-1) + i_t * c\u0303_t h_t = o_t * tanh(c_t)<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li> f_t\u3001i_t\u3001o_t \u5206\u522b\u662f\u9057\u5fd8\u95e8\u3001\u8f93\u5165\u95e8\u548c\u8f93\u51fa\u95e8<\/li>\n\n\n\n<li> c_t \u662f\u5355\u5143\u72b6\u6001<\/li>\n\n\n\n<li>h_t \u662f\u9690\u85cf\u72b6\u6001 <\/li>\n\n\n\n<li>x_t \u662f t \u65f6\u523b\u7684\u8f93\u5165 <\/li>\n\n\n\n<li>W \u548c b \u662f\u6743\u91cd\u77e9\u9635\u548c\u504f\u7f6e\u5411\u91cf <\/li>\n\n\n\n<li>\u03c3 \u662f\u6b63\u4f59\u5f26\u51fd\u6570\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>2. LSTM \u7684\u5de5\u4f5c\u6d41\u7a0b<\/strong>\u53ef\u4ee5\u6982\u62ec\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-98.png\" alt=\"\" class=\"wp-image-3029\"\/><\/figure>\n<\/div>\n\n\n<p><strong>3. LSTM \u7f51\u7edc<\/strong>\u5728\u591a\u4e2a\u9886\u57df\u8868\u73b0\u51fa\u8272\uff0c\u4ee5\u4e0b\u662f\u4e00\u4e9b<strong>\u5178\u578b\u5e94\u7528<\/strong>\uff1a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-99.png\" alt=\"\" class=\"wp-image-3030\"\/><\/figure>\n<\/div>\n\n\n<p>\u6211\u4e5f\u66fe\u5199\u8fc7\u51e0\u7bc7\u6d89\u53ca LSTM \u7684\u6587\u7ae0\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u70b9\u51fb\u4e0b\u9762\u7684\u94fe\u63a5\u9605\u8bfb\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzkzNzY0NjIyNQ==&amp;mid=2247484547&amp;idx=1&amp;sn=e5f8b876e6a1ff8c675646f270c628a7&amp;chksm=c28d057df5fa8c6bca341b56d2347eaf055caa522053e6683c24b8017b249256d11f0e16ece0#rd\" target=\"_blank\" rel=\"noreferrer noopener\">\u4f7f\u7528\u5806\u53e0&nbsp;<em>LSTM<\/em>&nbsp;\u6a21\u578b\u9884\u6d4b\u5e02\u573a\u8d8b\u52bf<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzkzNzY0NjIyNQ==&amp;mid=2247485728&amp;idx=1&amp;sn=e249506e64ee132020f6d307c74ffe61&amp;chksm=c28d08def5fa81c8ed8e3a8e0a57582e45c99ae7d39cf96bb8b8400079e97cdb83f35f68dc4f#rd\" target=\"_blank\" rel=\"noreferrer noopener\">\u9707\u60ca\u91d1\u878d\u754c\uff01\u4e09\u5927\u6df1\u5ea6\u5b66\u4e60\u6a21\u578b\u8054\u8882\uff0c\u7adf\u521b\u51fa66,941.5%\u9006\u5929\u56de\u62a5\u7387\uff01<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzkzNzY0NjIyNQ==&amp;mid=2247485644&amp;idx=1&amp;sn=fd5413f99afcca3a0b3ce6f6db6774bc&amp;chksm=c28d0932f5fa8024849619a9af5d372568cd6b3c328f5a167276c839467efdb60305fe129ff5#rd\" target=\"_blank\" rel=\"noreferrer noopener\">\u8fd0\u7528&nbsp;121&nbsp;\u7b56\u7565\u6a21\u578b\uff0c\u63d0\u4f9b\u7ed9\u60a8&nbsp;121%&nbsp;\u7684\u6295\u8d44\u6536\u76ca<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzkzNzY0NjIyNQ==&amp;mid=2247484881&amp;idx=1&amp;sn=9ba580490cdaf8370d4f7e2d67e0adc8&amp;chksm=c28d042ff5fa8d391018e491bd604e063d231137b35b42c0d19cf4b969dc7b2963f1e14b1faf&amp;token=1854235955&amp;lang=zh_CN#rd\" target=\"_blank\" rel=\"noreferrer noopener\">\u624b\u628a\u624b\u6559\u4f1a\u4f60\u7528&nbsp;AI&nbsp;\u548c&nbsp;Python&nbsp;\u8fdb\u884c\u80a1\u7968\u4ea4\u6613\u9884\u6d4b\uff08\u5b8c\u6574\u4ee3\u7801\u5e72\u8d27\uff09<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u4e8c\u3001\u601d\u7ef4\u589e\u5f3a LSTM \u7b80\u4ecb<\/strong><\/h3>\n\n\n\n<p>\u4f20\u7edf\u7684LSTM\u6a21\u578b\u65e0\u7591\u5177\u6709\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u4f46\u6211\u4eec\u7684\u613f\u666f\u662f\u5c06\u5176\u63a8\u5411\u4e00\u4e2a\u65b0\u7684\u9ad8\u5ea6\u3002\u6211\u4eec\u8ba1\u5212\u901a\u8fc7\u5f15\u5165\u4e00\u79cd\u201c\u601d\u7ef4\u201d\u673a\u5236\u6765\u8fdb\u4e00\u6b65\u63d0\u5347\u5176\u6027\u80fd\u3002\u6211\u4eec\u7684\u521b\u65b0\u601d\u8def\u5728\u4e8e\uff0c\u4e3a\u8f93\u5165\u5e8f\u5217\u7684\u6bcf\u4e00\u4e2a\u65f6\u95f4\u6b65\u751f\u6210\u4e00\u79cd\u62bd\u8c61\u7684\u8868\u5f81\u2014\u2014\u6211\u4eec\u79f0\u4e4b\u4e3a\u201c\u601d\u60f3\u201d\u3002\u5c06\u8fd9\u4e9b\u201c\u601d\u60f3\u201d\u878d\u5408\u5728\u4e00\u8d77\uff0c\u5e76\u4e0eLSTM\u7684\u8f93\u51fa\u76f8\u7ed3\u5408\uff0c\u4ee5\u6b64\u6765\u5b9e\u73b0\u66f4\u4e3a\u7cbe\u51c6\u7684\u9884\u6d4b\u3002\u8fd9\u5c31\u50cf\u662f\u5728LSTM\u7684\u5927\u8111\u4e2d\u690d\u5165\u4e00\u9897\u601d\u8003\u7684\u79cd\u5b50\uff0c\u8ba9\u5b83\u80fd\u591f\u4ee5\u66f4\u63a5\u8fd1\u4eba\u7c7b\u601d\u7ef4\u7684\u65b9\u5f0f\u7406\u89e3\u548c\u9884\u6d4b\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u8fd9\u79cd\u65b9\u6cd5\u53d7\u5230\u6ce8\u610f\u529b\u673a\u5236\u6982\u5ff5\u7684\u542f\u53d1\uff0c\u4f46\u6211\u4eec\u5e76\u4e0d\u662f\u4e13\u6ce8\u4e8e\u8f93\u5165\u7684\u7279\u5b9a\u90e8\u5206\uff0c\u800c\u662f\u4ea7\u751f\u66f4\u9ad8\u5c42\u6b21\u7684\u62bd\u8c61\uff08\u601d\u7ef4\uff09\uff0c\u4ece\u800c\u6355\u6349\u6574\u4e2a\u5e8f\u5217\u4e2d\u7684\u590d\u6742\u6a21\u5f0f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u4e09\u3001\u4ee3\u7801\u5b9e\u73b0<\/strong><\/h3>\n\n\n\n<p>\u6211\u4eec\u7684\u5b9e\u73b0\u88ab\u79f0\u4e3a LSTMWithThoughts\uff0c\u5b83\u6269\u5c55\u4e86\u57fa\u672c\u7684 LSTM \u67b6\u6784\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>class LSTMWithThoughts(nn.Module):\n    def __init__(self, input_dim, hidden_dim, thought_dim, num_thoughts, output_dim):\n        super(LSTMWithThoughts, self).__init__()\n        self.encoder = nn.LSTM(input_dim, hidden_dim, batch_first=True)\n        self.thought_generator = nn.Linear(hidden_dim, num_thoughts * thought_dim)\n        self.mlp_combine_thoughts = nn.Sequential(\n            nn.Linear(num_thoughts * thought_dim, thought_dim),\n            nn.ReLU(),\n            nn.Linear(thought_dim, thought_dim)\n        )\n        self.output_layer = nn.Linear(hidden_dim + thought_dim, output_dim)\n\n    def forward(self, x):\n        # LSTM encoding\n        _, (h_enc, _) = self.encoder(x.unsqueeze(1))  # Add sequence dimension\n        h_last = h_enc&#91;-1]\n\n        # Generate thoughts\n        thoughts = self.thought_generator(h_last)\n\n        # Apply MLP to combine thoughts\n        combined_thoughts = self.mlp_combine_thoughts(thoughts)\n\n        # Combine with last hidden state\n        combined_rep = torch.cat((combined_thoughts, h_last), dim=-1)\n\n        # Predict next price\n        prediction = self.output_layer(combined_rep)\n        return prediction<\/code><\/pre>\n\n\n\n<p><strong>\u4e3b\u8981\u7ec4\u6210\u90e8\u5206\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>LSTM \u7f16\u7801\u5668\uff1a\u5904\u7406\u8f93\u5165\u5e8f\u5217\uff0c\u4e3a\u6bcf\u4e2a\u65f6\u95f4\u6b65\u751f\u6210\u9690\u85cf\u72b6\u6001\u3002<\/li>\n\n\n\n<li>\u601d\u7ef4\u751f\u6210\u5668\uff1a\u4e3a\u6bcf\u4e2a\u9690\u85cf\u72b6\u6001\u521b\u5efa\u4e00\u4e2a\u601d\u7ef4\u5411\u91cf\u3002<\/li>\n\n\n\n<li>\u601d\u7ef4\u7ec4\u5408\u5668\uff1a\u5c06\u6240\u6709\u601d\u7ef4\u5411\u91cf\u5408\u5e76\u4e3a\u5355\u4e00\u7684\u7efc\u5408\u601d\u7ef4\u8868\u5f81\u3002<\/li>\n\n\n\n<li>\u8f93\u51fa\u5c42\uff1a\u5c06\u6700\u7ec8\u7684 LSTM \u9690\u85cf\u72b6\u6001\u4e0e\u7efc\u5408\u601d\u7ef4\u76f8\u7ed3\u5408\uff0c\u505a\u51fa\u6700\u7ec8\u9884\u6d4b\u3002<\/li>\n<\/ul>\n\n\n\n<p><strong>The forward pass\uff1a<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528 LSTM \u5bf9\u8f93\u5165\u5e8f\u5217\u8fdb\u884c\u7f16\u7801\u3002<\/li>\n\n\n\n<li>\u4e3a\u6bcf\u4e2a\u65f6\u95f4\u6b65\u751f\u6210\u60f3\u6cd5\u3002<\/li>\n\n\n\n<li>\u5c06\u8fd9\u4e9b\u60f3\u6cd5\u5408\u5e76\u4e3a\u4e00\u4e2a\u8868\u5f81\u3002<\/li>\n\n\n\n<li>\u5c06\u7ec4\u5408\u601d\u60f3\u4e0e\u6700\u7ec8\u7684 LSTM \u9690\u85cf\u72b6\u6001\u5408\u5e76\u3002<\/li>\n\n\n\n<li>\u5f97\u51fa\u6700\u7ec8\u9884\u6d4b\u7ed3\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fd9\u79cd\u67b6\u6784\u4f7f\u6a21\u578b\u65e2\u80fd\u5229\u7528 LSTM \u7684\u987a\u5e8f\u5904\u7406\u80fd\u529b\uff0c\u53c8\u80fd\u5229\u7528\u62bd\u8c61\u7684 &#8220;\u601d\u7ef4 &#8220;\u8868\u5f81\uff0c\u4ece\u800c\u6355\u6349\u80a1\u4ef7\u6570\u636e\u4e2d\u66f4\u591a\u7ec6\u5fae\u7684\u6a21\u5f0f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u56db\u3001\u8f93\u51fa\u6210\u679c<\/strong><\/h3>\n\n\n\n<p><strong>1. Reliance.NS<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a32.8966 <\/li>\n\n\n\n<li>\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee (MAPE)\uff1a0.0184 <\/li>\n\n\n\n<li>\u6d4b\u8bd5\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a33.4168 <\/li>\n\n\n\n<li>\u6d4b\u8bd5\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee (MAPE)\uff1a 0.01430.0143<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-100.png\" alt=\"\" class=\"wp-image-3033\"\/><\/figure>\n\n\n\n<p><strong>2. SBIN.NS<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a6.5945 <\/li>\n\n\n\n<li>\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee (MAPE)\uff1a0.0206 <\/li>\n\n\n\n<li>\u6d4b\u8bd5\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a7.9423 <\/li>\n\n\n\n<li>\u6d4b\u8bd5\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee (MAPE)\uff1a 0.01430.0143<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-101.png\" alt=\"\" class=\"wp-image-3034\"\/><\/figure>\n\n\n\n<p><strong>3. Manali Petro<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a3.1939 <\/li>\n\n\n\n<li>\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee (MAPE)\uff1a0.1065 <\/li>\n\n\n\n<li>\u6d4b\u8bd5\u5e73\u5747\u7edd\u5bf9\u8bef\u5dee (MAE)\uff1a1.8901 <\/li>\n\n\n\n<li>\u6d4b\u8bd5\u5e73\u5747\u7edd\u5bf9\u767e\u5206\u6bd4\u8bef\u5dee (MAPE)\uff1a 0.02110.0211<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/www.laoyulaoyu.com\/wp-content\/uploads\/2024\/11\/image-102.png\" alt=\"\" class=\"wp-image-3035\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u4e94\u3001\u89c2\u70b9\u603b\u7ed3<\/strong><\/h3>\n\n\n\n<p>\u6211\u4eec\u4e0a\u9762\u7684\u6587\u7ae0\u4e2d\u5c1d\u8bd5\u4e86\u4e00\u79cd\u65b9\u6cd5\uff0c\u5373\uff1a\u7f51\u7edc\u5728\u7ed9\u51fa\u6700\u7ec8\u9884\u6d4b\u4e4b\u524d\u4f1a\u8fdb\u884c\u66f4\u591a\u7684\u601d\u8003\u3002\u5b83\u4f1a\u53cd\u601d\u4e4b\u524d\u7684\u9690\u85cf\u72b6\u6001\uff0c\u7136\u540e\u5c06\u8fd9\u4e9b\u7ec4\u5408\u6210\u4e00\u4e2a\u601d\u60f3\u5411\u91cf\uff0c\u7528\u5b83\u6765\u9884\u6d4b\u672a\u6765\u3002\u6211\u8fd8\u8ba4\u4e3a\u8fd9\u53ef\u4ee5\u8fdb\u4e00\u6b65\u4e0e\u7b56\u7565\u7f51\u7edc\u7ed3\u5408\u8d77\u6765\uff0c\u901a\u8fc7\u5956\u52b1\u673a\u5236\u8fdb\u4e00\u6b65\u4f18\u5316\u9884\u6d4b\u7ed3\u679c\u3002\u8fd9\u5c31\u50cf\u662f\u7ed9\u7f51\u7edc\u88c5\u4e0a\u4e86\u4e00\u4e2a\u667a\u6167\u7684\u5927\u8111\uff0c\u8ba9\u5b83\u80fd\u591f\u66f4\u6709\u6548\u5730\u5b66\u4e60\u548c\u8fdb\u5316\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4f20\u7edfLSTM\u7f51\u7edc\u80fd\u591f\u5904\u7406\u957f\u671f\u4f9d\u8d56\u95ee\u9898\uff0c\u4f46\u5728\u80a1\u4ef7\u9884\u6d4b\u4efb\u52a1\u4e2d\u53ef\u80fd\u9700\u8981\u8fdb\u4e00\u6b65\u7684\u589e\u5f3a\u3002<\/strong><\/li>\n\n\n\n<li><strong>\u901a\u8fc7\u5f15\u5165\u201c\u601d\u60f3\u201d\u673a\u5236\uff0c\u53ef\u4ee5\u4f7fLSTM\u7f51\u7edc\u751f\u6210\u66f4\u9ad8\u5c42\u6b21\u7684\u62bd\u8c61\u8868\u793a\uff0c\u4ece\u800c\u63d0\u9ad8\u5bf9\u80a1\u4ef7\u65f6\u95f4\u5e8f\u5217\u7684\u9884\u6d4b\u80fd\u529b\u3002<\/strong><\/li>\n\n\n\n<li><code><strong>LSTMWithThoughts<\/strong><\/code>\u6a21\u578b\u7684\u5173\u952e\u5728\u4e8e\u5b83\u80fd\u591f\u7ed3\u5408LSTM\u7684\u9690\u85cf\u72b6\u6001\u548c\u751f\u6210\u7684\u601d\u7ef4\u8868\u5f81\uff0c\u5408\u6210\u51fa\u66f4\u4e3a\u5168\u9762\u7684\u7279\u5f81\uff0c\u7528\u4e8e\u6700\u7ec8\u7684\u9884\u6d4b\u3002<\/li>\n\n\n\n<li><strong>\u5b9e\u9a8c\u7ed3\u679c\u8868\u660e\uff0c\u76f8\u8f83\u4e8e\u4f20\u7edfLSTM\uff0c\u601d\u60f3\u589e\u5f3a\u578bLSTM\u5728\u80a1\u4ef7\u9884\u6d4b\u4e0a\u53d6\u5f97\u4e86\u66f4\u597d\u7684\u6027\u80fd\u3002<\/strong><\/li>\n\n\n\n<li>\u672a\u6765\u7684\u7814\u7a76\u53ef\u80fd\u4f1a\u5c06\u601d\u60f3\u589e\u5f3a\u578bLSTM\u4e0e\u7b56\u7565\u7f51\u7edc\u7ed3\u5408\uff0c\u901a\u8fc7\u5956\u52b1\u673a\u5236\u8fdb\u4e00\u6b65\u4f18\u5316\u9884\u6d4b\u7ed3\u679c\u3002<\/li>\n<\/ul>\n\n\n\n<p><p>\u4ee3\u7801\u793a\u4f8b\u548c Google Colab \u7b14\u8bb0\u672c<span style=\"font-size: revert;\">\u5730\u5740\u5982\u4e0b\uff1a<\/span><\/p><a href=\"https:\/\/colab.research.google.com\/drive\/10k_L1ISBoL5kKBlHWU_oDnP4ZFimGHDC?usp=sharing\">https:\/\/colab.research.google.com\/drive\/10k_L1ISBoL5kKBlHWU_oDnP4ZFimGHDC?usp=sharing<\/a><\/p>\n\n\n\n<p><br><\/p>\n\n\n\n<p><em>\u611f\u8c22\u60a8\u9605\u8bfb\u5230\u6700\u540e\uff0c\u5e0c\u671b\u672c\u6587\u80fd\u7ed9\u60a8\u5e26\u6765\u65b0\u7684\u6536\u83b7\u3002\u795d\u60a8\u6295\u8d44\u987a\u5229\uff01\u5982\u679c\u5bf9\u6587\u4e2d\u7684\u5185\u5bb9\u6709\u4efb\u4f55\u7591\u95ee\uff0c\u8bf7\u7ed9\u6211\u7559\u8a00\uff0c\u5fc5\u590d\u3002<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-align-center\" id=\"a1c6\"><strong><mark style=\"background-color:#ffffff\" class=\"has-inline-color has-cyan-bluish-gray-color\">\u672c\u6587\u5185\u5bb9\u4ec5\u4ec5\u662f\u6280\u672f\u63a2\u8ba8\u548c\u5b66\u4e60\uff0c\u5e76\u4e0d\u6784\u6210\u4efb\u4f55\u6295\u8d44\u5efa\u8bae\u3002<\/mark><\/strong><\/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\/2024\/12\/14\/%e6%8f%ad%e7%a7%98%ef%bc%9a%e5%a6%82%e4%bd%95%e7%94%a8%e6%80%9d%e6%83%b3%e5%a2%9e%e5%bc%ba%e5%9e%8blstm%e7%bd%91%e7%bb%9c%e7%b2%be%e5%87%86%e9%a2%84%e6%b5%8b%e8%82%a1%e4%bb%b7%ef%bc%9f\/\">Continue reading<span class=\"screen-reader-text\">\u63ed\u79d8\uff1a\u5982\u4f55\u7528\u601d\u60f3\u589e\u5f3a\u578bLSTM\u7f51\u7edc\u7cbe\u51c6\u9884\u6d4b\u80a1\u4ef7\uff1f<\/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-1713","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\/1713","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=1713"}],"version-history":[{"count":1,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1713\/revisions"}],"predecessor-version":[{"id":1714,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/posts\/1713\/revisions\/1714"}],"wp:attachment":[{"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/media?parent=1713"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/categories?post=1713"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/laoyulaoyu.com\/index.php\/wp-json\/wp\/v2\/tags?post=1713"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}