deepcharles / ruptures

ruptures: change point detection in Python
BSD 2-Clause "Simplified" License
1.6k stars 163 forks source link

Speed it up #321

Open lamtung16 opened 7 months ago

lamtung16 commented 7 months ago

I utilize numpy vectorization, resulting in significantly faster processing speeds. My Test Code

deepcharles commented 7 months ago

Thanks for this comparison. The function from ruptures that you used is not really optimized for the piecewise constant model (it is pure python). You should compare to rpt.KernelCPD(kernel="linear") instead, which calls a C implementation.