Open lamtung16 opened 5 hours ago
opart is quadratic. you claim the line below is constant but it is actually linear (arange)
V = C[:t] + lda + L(np.arange(1, t+1), t*np.ones(t), y, z) # O(1) -- L has complexity O(1) -- vectorized operation
to follow up about this, you should implement the pelt pruning rule and then submit a pr to ruptures
@tdhock, last semester, I presented a comparison between my code OPART function (uses vectorized operations to calculate V) and PELT from rupture (uses a regular for loop to calculate V). With a sequence length of about 40,000, my code runs 200 times faster. I know that all previous papers claim that OPART has a time complexity of O(n^2), but can I consider the time complexity of my OPART code to be O(n) or O(n log n)? I'm just asking out of curiosity; it's not that important.