Size of warping path (wp) obtained by Librosa Sub-sequence DTW is larger than expected #1741
Labels
documentation
Issues relating to docstrings, examples, and documentation build
question
Issues asking for help doing something
Hi,
I've encountered an issue while utilizing the librosa sub-sequence Dynamic Time Warping (DTW) function. It seems that the size of the obtained warping path (wp) is unexpectedly larger than the expected value of N.
I'm using the following code to compute DTW:
D, wp = librosa.sequence.dtw(
X=patch,
Y=patch_ref,
metric='euclidean',
step_sizes_sigma=[[1, 0], [0, 3], [1, 3]],
weights_mul=np.array([1, 1, 1]),
band_rad=0.25,
subseq=True,
backtrack=True,
)
Where X is an np.ndarray with a shape of (K, N), where K is 13 and N is 100, and Y is an np.ndarray with a shape of (K, M), where K is also 13 but M is 1823.
According to the documentation of librosa.sequence.dtw, the expected shape of the warping path wp should be (N, 2). However, in my specific case, the size of wp is (101, 2), which is unexpected. The size of D in my case is (N,M).
I have enclosed the relevant data with this report. Please see the attached zip file:
dtw_files.zip
librosa.version = '0.9.2'
Your feedback on this would be greatly appreciated.
Thank you,
The text was updated successfully, but these errors were encountered: