質問編集履歴
3
画像の添付、発生している問題についての追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,6 +28,12 @@
|
|
28
28
|
```
|
29
29
|
調べたところ、使用しているデータが定常性を持っていないことが原因っぽいのですが、定常性を持つように変換する方法がわかりません。対数変換、差分変換等いろいろありましたが、どれを使うべきなのかわかりませんでした。
|
30
30
|
|
31
|
+
### 発生している問題についての追記事項
|
32
|
+
上記のソースコードを実行すると、自己相関、偏自己相関のコレログラム自体の描画はできました。
|
33
|
+
しかし、偏自己相関のグラフを見ていただくとわかる通り、[-1, 1]の範囲外の値をとってしまっています。
|
34
|
+
これは、実際に用いているデータが非定常で定常なデータに変換していないことが原因なのでしょうか。
|
35
|
+

|
36
|
+

|
31
37
|
|
32
38
|
|
33
39
|
### 該当のソースコード
|
2
どの行を実行するとwarningが出るかを質問に追記しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,10 +18,17 @@
|
|
18
18
|
```
|
19
19
|
C:\Users\***\anaconda3\envs\py38\lib\site-packages\statsmodels\tsa\stattools.py:667: FutureWarning: fft=True will become the default after the release of the 0.12 release of statsmodels. To suppress this warning, explicitly set fft=False.
|
20
20
|
warnings.warn(
|
21
|
+
|
22
|
+
↑close_acf = sm.tsa.statstools.acf(close_train, nlags=20)を実行すると出る
|
23
|
+
|
21
24
|
C:\Users\***\anaconda3\envs\py38\lib\site-packages\statsmodels\regression\linear_model.py:1434: RuntimeWarning: invalid value encountered in sqrt
|
22
25
|
return rho, np.sqrt(sigmasq)
|
26
|
+
|
27
|
+
↑fig = sm.graphics.tsa.plot_pacf(close_train, lags=10)を実行すると出る
|
23
28
|
```
|
24
29
|
調べたところ、使用しているデータが定常性を持っていないことが原因っぽいのですが、定常性を持つように変換する方法がわかりません。対数変換、差分変換等いろいろありましたが、どれを使うべきなのかわかりませんでした。
|
30
|
+
|
31
|
+
|
25
32
|
|
26
33
|
### 該当のソースコード
|
27
34
|
|
1
エラーメッセージの修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -16,9 +16,9 @@
|
|
16
16
|
### 発生している問題・エラーメッセージ
|
17
17
|
|
18
18
|
```
|
19
|
-
stattools.py:667: FutureWarning: fft=True will become the default after the release of the 0.12 release of statsmodels. To suppress this warning, explicitly set fft=False.
|
20
|
-
|
21
|
-
linear_model.py:1434: RuntimeWarning: invalid value encountered in sqrt
|
19
|
+
C:\Users\***\anaconda3\envs\py38\lib\site-packages\statsmodels\tsa\stattools.py:667: FutureWarning: fft=True will become the default after the release of the 0.12 release of statsmodels. To suppress this warning, explicitly set fft=False.
|
20
|
+
warnings.warn(
|
21
|
+
C:\Users\***\anaconda3\envs\py38\lib\site-packages\statsmodels\regression\linear_model.py:1434: RuntimeWarning: invalid value encountered in sqrt
|
22
22
|
return rho, np.sqrt(sigmasq)
|
23
23
|
```
|
24
24
|
調べたところ、使用しているデータが定常性を持っていないことが原因っぽいのですが、定常性を持つように変換する方法がわかりません。対数変換、差分変換等いろいろありましたが、どれを使うべきなのかわかりませんでした。
|