Python 時系列分析 1,000本ノック
– ノック43: 時系列データの距離 –

Python 時系列分析 1,000本ノック– ノック43: 時系列データの距離 –
次の Python コードの出力はどれでしょうか?

Python コード:

from scipy.spatial.distance import euclidean
from fastdtw import fastdtw
import numpy as np

np.random.seed(32)
time_series_a = np.random.randn(100).cumsum()
time_series_b = np.random.randn(100).cumsum()

distance, path = fastdtw(
    time_series_a.reshape(-1, 1), 
    time_series_b.reshape(-1, 1), 
    dist=euclidean)

print(distance)

 

回答の選択肢:

(A) 2つの時系列間のマハラノビス距離
(B) 2つの時系列間のダイナミックタイムワーピング距離
(C) 2つの時系列間のピアソン相関距離
(D) 2つの時系列間のマンハッタン距離