Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difference in result between python and .so #25

Open
jifwin opened this issue Mar 1, 2019 · 2 comments
Open

Difference in result between python and .so #25

jifwin opened this issue Mar 1, 2019 · 2 comments

Comments

@jifwin
Copy link

jifwin commented Mar 1, 2019

Hi

import fastdtw

x = range(0, 1000)
y = [0 for i in x]

distance, path = fastdtw.fastdtw(x, y)

With .so the path is:
0000 = {tuple} <class 'tuple'>: (0, 0)
0001 = {tuple} <class 'tuple'>: (1, 1)
0002 = {tuple} <class 'tuple'>: (2, 2)
0003 = {tuple} <class 'tuple'>: (3, 3)
0004 = {tuple} <class 'tuple'>: (4, 4)
0005 = {tuple} <class 'tuple'>: (5, 5)
0006 = {tuple} <class 'tuple'>: (6, 6)
0007 = {tuple} <class 'tuple'>: (7, 7)
0008 = {tuple} <class 'tuple'>: (8, 8)
0009 = {tuple} <class 'tuple'>: (9, 9)
0010 = {tuple} <class 'tuple'>: (10, 10)
0011 = {tuple} <class 'tuple'>: (11, 11)
0012 = {tuple} <class 'tuple'>: (12, 12)
0013 = {tuple} <class 'tuple'>: (13, 13)
0014 = {tuple} <class 'tuple'>: (14, 14)
0015 = {tuple} <class 'tuple'>: (15, 15)
0016 = {tuple} <class 'tuple'>: (16, 16)
0017 = {tuple} <class 'tuple'>: (17, 17)
0018 = {tuple} <class 'tuple'>: (18, 18)
0019 = {tuple} <class 'tuple'>: (19, 19)
0020 = {tuple} <class 'tuple'>: (20, 20)
0021 = {tuple} <class 'tuple'>: (21, 21)
0022 = {tuple} <class 'tuple'>: (22, 22)
0023 = {tuple} <class 'tuple'>: (23, 23)
0024 = {tuple} <class 'tuple'>: (24, 24)
0025 = {tuple} <class 'tuple'>: (25, 25)
0026 = {tuple} <class 'tuple'>: (26, 26)
0027 = {tuple} <class 'tuple'>: (27, 27)
0028 = {tuple} <class 'tuple'>: (28, 28)
0029 = {tuple} <class 'tuple'>: (29, 29)
0030 = {tuple} <class 'tuple'>: (30, 30)
0031 = {tuple} <class 'tuple'>: (31, 31)
0032 = {tuple} <class 'tuple'>: (32, 32)
0033 = {tuple} <class 'tuple'>: (33, 33)
0034 = {tuple} <class 'tuple'>: (34, 34)
0035 = {tuple} <class 'tuple'>: (35, 35)
0036 = {tuple} <class 'tuple'>: (36, 36)
0037 = {tuple} <class 'tuple'>: (37, 37)
0038 = {tuple} <class 'tuple'>: (38, 38)
0039 = {tuple} <class 'tuple'>: (39, 39)
0040 = {tuple} <class 'tuple'>: (40, 40)
0041 = {tuple} <class 'tuple'>: (41, 41)
0042 = {tuple} <class 'tuple'>: (42, 42)
0043 = {tuple} <class 'tuple'>: (43, 43)
0044 = {tuple} <class 'tuple'>: (44, 44)
0045 = {tuple} <class 'tuple'>: (45, 45)
0046 = {tuple} <class 'tuple'>: (46, 46)
0047 = {tuple} <class 'tuple'>: (47, 47)
0048 = {tuple} <class 'tuple'>: (48, 48)
0049 = {tuple} <class 'tuple'>: (49, 49)
0050 = {tuple} <class 'tuple'>: (50, 50)
0051 = {tuple} <class 'tuple'>: (51, 51)
0052 = {tuple} <class 'tuple'>: (52, 52)
0053 = {tuple} <class 'tuple'>: (53, 53)
0054 = {tuple} <class 'tuple'>: (54, 54)
0055 = {tuple} <class 'tuple'>: (55, 55)
0056 = {tuple} <class 'tuple'>: (56, 56)
0057 = {tuple} <class 'tuple'>: (57, 57)
0058 = {tuple} <class 'tuple'>: (58, 58)
0059 = {tuple} <class 'tuple'>: (59, 59)
0060 = {tuple} <class 'tuple'>: (60, 60)
0061 = {tuple} <class 'tuple'>: (61, 61)
0062 = {tuple} <class 'tuple'>: (62, 62)
0063 = {tuple} <class 'tuple'>: (63, 63)
0064 = {tuple} <class 'tuple'>: (64, 64)
0065 = {tuple} <class 'tuple'>: (65, 65)
0066 = {tuple} <class 'tuple'>: (66, 66)
0067 = {tuple} <class 'tuple'>: (67, 67)
0068 = {tuple} <class 'tuple'>: (68, 68)
0069 = {tuple} <class 'tuple'>: (69, 69)
0070 = {tuple} <class 'tuple'>: (70, 70)
0071 = {tuple} <class 'tuple'>: (71, 71)
0072 = {tuple} <class 'tuple'>: (72, 72)
0073 = {tuple} <class 'tuple'>: (73, 73)
0074 = {tuple} <class 'tuple'>: (74, 74)
0075 = {tuple} <class 'tuple'>: (75, 75)
0076 = {tuple} <class 'tuple'>: (76, 76)
0077 = {tuple} <class 'tuple'>: (77, 77)
0078 = {tuple} <class 'tuple'>: (78, 78)
0079 = {tuple} <class 'tuple'>: (79, 79)
0080 = {tuple} <class 'tuple'>: (80, 80)
0081 = {tuple} <class 'tuple'>: (81, 81)
0082 = {tuple} <class 'tuple'>: (82, 82)
0083 = {tuple} <class 'tuple'>: (83, 83)
0084 = {tuple} <class 'tuple'>: (84, 84)
0085 = {tuple} <class 'tuple'>: (85, 85)
0086 = {tuple} <class 'tuple'>: (86, 86)
0087 = {tuple} <class 'tuple'>: (87, 87)
0088 = {tuple} <class 'tuple'>: (88, 88)
0089 = {tuple} <class 'tuple'>: (89, 89)
0090 = {tuple} <class 'tuple'>: (90, 90)
0091 = {tuple} <class 'tuple'>: (91, 91)
0092 = {tuple} <class 'tuple'>: (92, 92)
0093 = {tuple} <class 'tuple'>: (93, 93)
0094 = {tuple} <class 'tuple'>: (94, 94)
0095 = {tuple} <class 'tuple'>: (95, 95)
0096 = {tuple} <class 'tuple'>: (96, 96)
0097 = {tuple} <class 'tuple'>: (97, 97)
0098 = {tuple} <class 'tuple'>: (98, 98)
0099 = {tuple} <class 'tuple'>: (99, 99)

However, when I remove .so from the system (or use Mac with no cython) the result is:
0000 = {tuple} <class 'tuple'>: (0, 0)
0001 = {tuple} <class 'tuple'>: (0, 1)
0002 = {tuple} <class 'tuple'>: (0, 2)
0003 = {tuple} <class 'tuple'>: (0, 3)
0004 = {tuple} <class 'tuple'>: (0, 4)
0005 = {tuple} <class 'tuple'>: (0, 5)
0006 = {tuple} <class 'tuple'>: (1, 5)
0007 = {tuple} <class 'tuple'>: (2, 6)
0008 = {tuple} <class 'tuple'>: (3, 7)
0009 = {tuple} <class 'tuple'>: (4, 8)
0010 = {tuple} <class 'tuple'>: (5, 9)
0011 = {tuple} <class 'tuple'>: (6, 10)
0012 = {tuple} <class 'tuple'>: (7, 11)
0013 = {tuple} <class 'tuple'>: (8, 12)
0014 = {tuple} <class 'tuple'>: (9, 13)
0015 = {tuple} <class 'tuple'>: (10, 14)
0016 = {tuple} <class 'tuple'>: (11, 15)
0017 = {tuple} <class 'tuple'>: (12, 16)
0018 = {tuple} <class 'tuple'>: (13, 17)
0019 = {tuple} <class 'tuple'>: (14, 18)
0020 = {tuple} <class 'tuple'>: (15, 19)
0021 = {tuple} <class 'tuple'>: (16, 20)
0022 = {tuple} <class 'tuple'>: (17, 21)
0023 = {tuple} <class 'tuple'>: (18, 22)
0024 = {tuple} <class 'tuple'>: (19, 23)
0025 = {tuple} <class 'tuple'>: (20, 24)
0026 = {tuple} <class 'tuple'>: (21, 25)
0027 = {tuple} <class 'tuple'>: (22, 26)
0028 = {tuple} <class 'tuple'>: (23, 27)
0029 = {tuple} <class 'tuple'>: (24, 28)
0030 = {tuple} <class 'tuple'>: (25, 29)
0031 = {tuple} <class 'tuple'>: (26, 30)
0032 = {tuple} <class 'tuple'>: (27, 31)
0033 = {tuple} <class 'tuple'>: (28, 32)
0034 = {tuple} <class 'tuple'>: (29, 33)
0035 = {tuple} <class 'tuple'>: (30, 34)
0036 = {tuple} <class 'tuple'>: (31, 35)
0037 = {tuple} <class 'tuple'>: (32, 36)
0038 = {tuple} <class 'tuple'>: (33, 37)
0039 = {tuple} <class 'tuple'>: (34, 38)
0040 = {tuple} <class 'tuple'>: (35, 39)
0041 = {tuple} <class 'tuple'>: (36, 40)
0042 = {tuple} <class 'tuple'>: (37, 41)
0043 = {tuple} <class 'tuple'>: (38, 42)
0044 = {tuple} <class 'tuple'>: (39, 43)
0045 = {tuple} <class 'tuple'>: (40, 44)
0046 = {tuple} <class 'tuple'>: (41, 45)
0047 = {tuple} <class 'tuple'>: (42, 46)
0048 = {tuple} <class 'tuple'>: (43, 47)
0049 = {tuple} <class 'tuple'>: (44, 48)
0050 = {tuple} <class 'tuple'>: (45, 49)
0051 = {tuple} <class 'tuple'>: (46, 50)
0052 = {tuple} <class 'tuple'>: (47, 51)
0053 = {tuple} <class 'tuple'>: (48, 52)
0054 = {tuple} <class 'tuple'>: (49, 53)
0055 = {tuple} <class 'tuple'>: (50, 54)
0056 = {tuple} <class 'tuple'>: (51, 55)
0057 = {tuple} <class 'tuple'>: (52, 56)
0058 = {tuple} <class 'tuple'>: (53, 57)
0059 = {tuple} <class 'tuple'>: (54, 58)
0060 = {tuple} <class 'tuple'>: (55, 59)
0061 = {tuple} <class 'tuple'>: (56, 60)
0062 = {tuple} <class 'tuple'>: (57, 61)
0063 = {tuple} <class 'tuple'>: (58, 62)
0064 = {tuple} <class 'tuple'>: (59, 63)
0065 = {tuple} <class 'tuple'>: (60, 64)
0066 = {tuple} <class 'tuple'>: (61, 65)
0067 = {tuple} <class 'tuple'>: (62, 66)
0068 = {tuple} <class 'tuple'>: (63, 67)
0069 = {tuple} <class 'tuple'>: (64, 68)
0070 = {tuple} <class 'tuple'>: (65, 69)
0071 = {tuple} <class 'tuple'>: (66, 70)
0072 = {tuple} <class 'tuple'>: (67, 71)
0073 = {tuple} <class 'tuple'>: (68, 72)
0074 = {tuple} <class 'tuple'>: (69, 73)
0075 = {tuple} <class 'tuple'>: (70, 74)
0076 = {tuple} <class 'tuple'>: (71, 75)
0077 = {tuple} <class 'tuple'>: (72, 76)
0078 = {tuple} <class 'tuple'>: (73, 77)
0079 = {tuple} <class 'tuple'>: (74, 78)
0080 = {tuple} <class 'tuple'>: (75, 79)
0081 = {tuple} <class 'tuple'>: (76, 80)
0082 = {tuple} <class 'tuple'>: (77, 81)
0083 = {tuple} <class 'tuple'>: (78, 82)
0084 = {tuple} <class 'tuple'>: (79, 83)
0085 = {tuple} <class 'tuple'>: (80, 84)
0086 = {tuple} <class 'tuple'>: (81, 85)
0087 = {tuple} <class 'tuple'>: (82, 86)
0088 = {tuple} <class 'tuple'>: (83, 87)
0089 = {tuple} <class 'tuple'>: (84, 88)
0090 = {tuple} <class 'tuple'>: (85, 89)
0091 = {tuple} <class 'tuple'>: (86, 90)
0092 = {tuple} <class 'tuple'>: (87, 91)
0093 = {tuple} <class 'tuple'>: (88, 92)
0094 = {tuple} <class 'tuple'>: (89, 93)
0095 = {tuple} <class 'tuple'>: (90, 94)
0096 = {tuple} <class 'tuple'>: (91, 95)
0097 = {tuple} <class 'tuple'>: (92, 96)
0098 = {tuple} <class 'tuple'>: (93, 97)
0099 = {tuple} <class 'tuple'>: (94, 98)
0100 = {tuple} <class 'tuple'>: (95, 99)
0101 = {tuple} <class 'tuple'>: (96, 100)
0102 = {tuple} <class 'tuple'>: (97, 101)
0103 = {tuple} <class 'tuple'>: (98, 102)
0104 = {tuple} <class 'tuple'>: (99, 103)

The same applies to input series that has constant values over some time windows.

@slaypni
Copy link
Owner

slaypni commented Mar 5, 2019

@jifwin Thank you for your reporting. The result of python version seems a bit strange.

@apacha
Copy link

apacha commented Feb 26, 2021

I'm also getting different results on different machines. Maybe related to #46

Environment 1

[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14), (15, 15), (16, 16), (17, 17), (18, 18), (19, 19), (20, 20), (21, 21), (22, 22), (23, 23), (24, 24), (25, 25), (26, 26), (27, 27), (28, 28), (29, 29), (30, 30), (31, 31), (32, 32), (33, 33), (34, 34), (35, 35), (36, 36), (37, 37), (38, 38), (39, 39), (40, 40), (41, 41), (42, 42), (43, 43), (44, 44), (45, 45), (46, 46), (47, 47), (48, 48), (49, 49), (50, 50), (51, 51), (52, 52), (53, 53), (54, 54), (55, 55), (56, 56), (57, 57), (58, 58), (59, 59), (60, 60), (61, 61), (62, 62), (63, 63), (64, 64), (65, 65), (66, 66), (67, 67), (68, 68), (69, 69), (70, 70), (71, 71), (72, 72), (73, 73), (74, 74), (75, 75), (76, 76), (77, 77), (78, 78), (79, 79), (80, 80), (81, 81), (82, 82), (83, 83), (84, 84), (85, 85), (86, 86), (87, 87), (88, 88), (89, 89), (90, 90), (91, 91), (92, 92), (93, 93), (94, 94), (95, 95), (96, 96), (97, 97), (98, 98), (99, 99)]

Environment 2

[(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (1, 5), (2, 6), (3, 7), (4, 8), (5, 9), (6, 10), (7, 11), (8, 12), (9, 13), (10, 14), (11, 15), (12, 16), (13, 17), (14, 18), (15, 19), (16, 20), (17, 21), (18, 22), (19, 23), (20, 24), (21, 25), (22, 26), (23, 27), (24, 28), (25, 29), (26, 30), (27, 31), (28, 32), (29, 33), (30, 34), (31, 35), (32, 36), (33, 37), (34, 38), (35, 39), (36, 40), (37, 41), (38, 42), (39, 43), (40, 44), (41, 45), (42, 46), (43, 47), (44, 48), (45, 49), (46, 50), (47, 51), (48, 52), (49, 53), (50, 54), (51, 55), (52, 56), (53, 57), (54, 58), (55, 59), (56, 60), (57, 61), (58, 62), (59, 63), (60, 64), (61, 65), (62, 66), (63, 67), (64, 68), (65, 69), (66, 70), (67, 71), (68, 72), (69, 73), (70, 74), (71, 75), (72, 76), (73, 77), (74, 78), (75, 79), (76, 80), (77, 81), (78, 82), (79, 83), (80, 84), (81, 85), (82, 86), (83, 87), (84, 88), (85, 89), (86, 90), (87, 91), (88, 92), (89, 93), (90, 94), (91, 95), (92, 96), (93, 97), (94, 98), (95, 99), (96, 99), (97, 99), (98, 99), (99, 99)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants