SlideShare a Scribd company logo
1 of 20
Download to read offline
Multi-step Ahead Time Series 
Forecasting for Different Data Patterns
Based on LSTM Recurrent Neural
Network 日時:
中村研樋口研合同ゼミ
発表者: 大島悠
所属: 樋口研究室D1
日時: 2022/6/30
1
目次
CONTENTS
1. 概要
2. 使用する手法
3. 結果および考察
4. 実際の問題への応用
・・・・・
・・・・・
・・・・・
・・・・・
4-7
9-13
15-17
19
2
1 概要
3
标题预设
❏ 1変量時系列データにおいて、時刻0~T-1を学習用データとし、時刻T~T+Nをテスト用データとして
予測するという問題設定。
❏ 先行研究にはiterate-basedな手法とdirect-basedな手法があるが、今回は前者を扱う。時刻tの予
測結果を、時刻t+1を出力するモデルへの入力に含むもので、時刻が進むにつれて誤差が蓄積される
という特徴がある。
❏ 本研究の目的は、異なる特徴をもつ3つのデータに対してiterate-basedなLSTMを適用し、その評
価を行い知見を得ること。benchmarkとして、ARIMAモデルとGRNN(Generalized Regression
Neural Network)を採用する。
❏ 3つのデータは、A. 強い周期の電力データ B.強い周期とトレンドのAirPassengersデータ
C.長い周期かつ複雑な通信設備データ から成る。
1. 概要
4
結果は、A,BにおいてARIMAとLSTMに優位性があった。
Cにおいて、LSTMで大まかな変動を予測することができた。
标题预设
5
Time
Value
A. 強い周期の電力データ
※ 画像は全データの
内一部(大きな構造
変化はない)。時刻
0~1999が学習用
データ、2000~2349
がテスト用データ。
1. 概要
出典: [1]
6
B. 強い周期とトレンドのAirPassengersデータ
Time
Value
※ 時刻0~99
が学習用デー
タ、100~143
がテスト用
データ。
1. 概要
出典: [1]
7
C. 長い周期かつ複雑な通信設備データ
※
時刻0~2519
が学習用デー
タ、
2520~3499が
テスト用デー
タ。
1. 概要
Value
・・・
周期およそ250
周期と振幅が微妙に変化し、
ノイズも大きい
・・・
Time 出典: [1]
2使用する手法
8
标题预设
1. ARIMAモデル
○ 現系列にd次の階差を取り、その差分に対してARMAモデルを当てはめたもの
○ dは差分検定で、pとqはある範囲内で総当り的に最適化(Rのauto.arima)。評価値はAICなど。
2. GRNN
○ General Regressionは重回帰モデルの目的変数を多次元に拡張したもの。
○ 現時点で僕は未理解だが、GRNNはGeneral Regressionの推定にニューラルネットワークを用い
たもの?と想像している。
9
2. 使用する手法
ARモデル MAモデル
図. ARIMAモデルの数式
※ 注意
1.
2.
3. LSTM
○ feed forwardなneural networkに再帰構造をもたせたRNN、の発展系
○ RNNの勾配消失問題(同じ重みによる積の繰り返しによる)を記憶セルの導入で解決
○ 評価値(MSEやCrossEntropy)に対して勾配法(SGD, Adamなど)でパラメータを学習
10
2. 使用する手法
a. 学習用データ
b. 説明変数・目的変数に分割
c. 3組のデータが取得
(4組目はテスト用)
図. LSTMの模式図
(出典: [2])
図. LSTMの数式
标题预设
2. 使用する手法
11
LSTMの学習・テストの設定
1. データの前処理
○ A: 最大最小が既知なので、Max-Min Scalerで正規化。
○ B: トレンドがあるので増加率をとってから、Max-Min Scalerで正規化。
○ C: 移動平均線(重複なし)と、残差に分解。
a. 学習用データ
b. 説明変数・目的変数に分割
c. 3組のデータが取得
(4組目はテスト用)
図. 前処理の様子
B
1.現系列 2.増加率 3.Min Max Scaler
増加率の数式
标题预设
2. 使用する手法
12
LSTMの学習・テストの設定
1. データの前処理
○ A: 最大最小が既知なので、Max-Min Scalerで正規化。
○ B: トレンドがあるので増加率をとってから、Max-Min Scalerで正規化。
○ C: 移動平均線(重複なし)と、残差に分解。
a. 学習用データ
b. 説明変数・目的変数に分割
c. 3組のデータが取得
(4組目はテスト用)
図. 前処理の様子
C
1.現系列 2.移動平均 3.現系列 - 移動平均線
出典: [1]
1.
2. データ分割(※ 全手法共通)
○ あるwindow widthでデータ分割。window widthが100なら、1組目は先頭から100個のデー
タが説明変数で、101個目が目的変数に対応。
○ テスト中は、予測結果を説明変数末尾へ追加・先頭削除を繰り返し、window widthを保つ。
标题预设
2. 使用する手法
13
a. 学習用データ
b. 説明変数・目的変数に分割
c. 3組のデータが取得
(4組目はテスト用)
図. データ分割の様子(例:sample size 7, window width 4)
LSTMの学習・テストの設定
3結果および考察
14
❏ 結果
○ ARIMAとLSTMのMSEは0.004程度の差であり、同等の精度で
ある。GRNNは比較して0.2程度の差があり劣っている。
❏ 考察
○ 強い周期のデータに対しては3手法の内ARIMAとLSTMが有
望。2者から1者を選ぶ際は、精度以外の観点(モデリングの
簡単さ、計算量、拡張性、など)で選択することが求められ
そう。
4. 結果および考察
15
A. 強い周期の電力データ
図. Aの予測結果およびMSE 出典: [1]
❏ 結果
○ LSTMが最良で予測のMSEがおよそ0.06、次いでARIMAが
0.09。GRNNはかなり悪い。
❏ 考察
○ GRNNの精度が低い理由は、トレンドの影響をうまくモ
デリングできないモデル構造だからと見られる。
(iterate-basedな手法の特徴である、誤差蓄積が1cycle後か
ら出現。)
○ ARIMAよりLSTMが優れた理由は、LSTMの拡張性にあ
るのではと推察。論文に細かい設定は記述されていないが、
LSTMのハイパラ次第で、表現力や汎化性能は大きく変化。
4. 結果および考察
16
図. Bの予測結果およびMSPE
B. 強い周期とトレンドのAirPassengersデータ
出典: [1]
❏ 結果
○ 移動平均の周期性を少しは表現できているが、精度は良くな
い。MSEは16程度となった。
○ LSTM以外の2手法は、そもそも適切でないとされ、適用自体
をしていない。
❏ 考察
○ 周期や振幅が複雑に変化するパターンだと、この問題設定の
予測は、あまり精度が良くならないと推察。
○ 周期や振幅の変化と、相関が高いような他の共変量を
組み込めば精度が改善しそうな雰囲気。
4. 結果および考察
17
図. Cの予測結果およびMSE
C. 長い周期かつ複雑な通信設備データ
移動平均に対する予測
残差に対する予測
出典: [1]
4実際の問題への応用
18
标题预设
当日に、WebサイトとJupyter
Notebookを画面共有して説明する予定
5. 実際の問題への応用
19
参考文献
20
● [1] Multi-step Ahead Time Series Forecasting for Different Data Patterns
Based on LSTM Recurrent Neural
Network(https://www.researchgate.net/publication/324381648_Multi-step_Ahe
ad_Time_Series_Forecasting_for_Different_Data_Patterns_Based_on_LSTM
_Recurrent_Neural_Network)
● [2] LSTMネットワークの概要
(https://qiita.com/KojiOhki/items/89cd7b69a8a6239d67ca)
● [3] Air Passengers |
Kaggle(https://www.kaggle.com/datasets/rakannimer/air-passengers)
● [4] A general regression neural
network(https://www.inf.ufrgs.br/~engel/data/media/file/cmp121/GRNN.pdf)
● [5]

More Related Content

Featured

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

220630_ohshima_MultiStepLSTM.pdf