I want to identify frequent regions shared by the >2 timeseries data. For instance consider the figure below that contains three timeseries. The frequent regions shared by more than 2 timeseries are highlighted in the figure.
I cannot use direct string matching since it is unrealistic to expect that the frequent regions will have exactly the same pattern. In that sense, I am assuming the correct way to do this using some density based method
.
I have been searching for python libraries that can be used in this task. However, I could not find any useful resource/method that I can use in this regard. Please suggest me a suitable way to do this. I have mentioned an example dataset below that consists of 9 timeseries.
my_trajectories = [[0.3052181314648489, 0.30766803671106446, 0.29601888803724985, 0.29890704763215403, 0.3055833782378746, 0.2961512455811338, 0.30551879726798775, 0.2877287585539432, 0.2862261762400396, 0.27975406443649825], [0.27721407425411776, 0.26353507345946553, 0.2654882420542686, 0.26434046856886523, 0.29276053449148465, 0.2811775157932016, 0.2628070247182692, 0.26792539388555686, 0.25339224264760607, 0.2618138556904263], [0.26099953694822686, 0.261102541922727, 0.26557333180667536, 0.2819354241351113, 0.2957872369689673, 0.29080867377006003, 0.2832656933593939, 0.26600024650012716, 0.2846119520405219, 0.2736782651173511], [0.23987439985305858, 0.2327797711988322, 0.2552256800981605, 0.2667789954960524, 0.28847779023551634, 0.2547449833968282, 0.26777522392799374, 0.2828532620994906, 0.24669040792541377, 0.2652813351006664], [0.21295138061838803, 0.2157357073752202, 0.22082625636081016, 0.20495157230158634, 0.22811842227746865, 0.21918165851508642, 0.21511088624667948, 0.2179189961080439, 0.2116705241008199, 0.2089681945605301], [0.23440600639287584, 0.23669742316619335, 0.2491371139766175, 0.24643199402246801, 0.2688850352131275, 0.2599131215774288, 0.2715347562596504, 0.26625967992814115, 0.2477969521562306, 0.26945384982348486], [0.2384855324968707, 0.22215346028552016, 0.2536969645640844, 0.22652630128592377, 0.23498213798020273, 0.24837596835630332, 0.23156891079796454, 0.23566042347998292, 0.2437089617041927, 0.24771814302670092], [0.37932313040694393, 0.37932313040694393, 0.26384391236291155, 0.32481015508966876, 0.32481015508966876, 0.32481015508966876, 0.32481015508966876, 0.3609331063125676, 0.25831415976330585, 0.23075247425971726], [0.2083674033029731, 0.22567500325183854, 0.2087268790797973, 0.21335721026863355, 0.22211196073382994, 0.21189599549063626, 0.22713124614379393, 0.21554381086710045, 0.19498705204487204, 0.20674911290583015]]
I am happy to provide more details if needed.