Question regarding which search method is used for a kernelcpd example #218
-
Hi, I had another quick question regarding which search method is used for an example of the following form (this is similar to the example used in the music segmentation example in the docs: import ruptures as rpt
gap = 90
algo = rpt.KernelCPD(kernel="rbf",min_size=gap).fit(signal_returns)
# choose the number of changes
n_bkps_max = 50 # K_max
# Start by computing the segmentation with most changes.
# After start, all segmentations with 1, 2,..., K_max-1 changes are also available
_ = algo.predict(n_bkps_max) From the docs it seems like dynamic programming is used when you pass in the max number of changes. I was wondering which algorithm from the associated paper "Selective review of offline change point detection methods" this corresponds to? Sorry if this question is trivial, but I couldn't seem to find this info in the docs or source code. Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
If you use Celisse, A., Marot, G., Pierre-Jean, M., & Rigaill, G. (2018). New efficient algorithms for multiple change-point detection with reproducing kernels. Computational Statistics and Data Analysis, 128, 200–220. If you use Both have a time complexity of the order of T^2 (where T is the length of the signal). However, the first one has a memory complexity of the order of T and T^2 for the second. |
Beta Was this translation helpful? Give feedback.
If you use
rpt.KernelCPD(kernel="rbf")
, then the algorithm behind it is from the following article:Celisse, A., Marot, G., Pierre-Jean, M., & Rigaill, G. (2018). New efficient algorithms for multiple change-point detection with reproducing kernels. Computational Statistics and Data Analysis, 128, 200–220.
If you use
rpt.Dynp(model="rbf")
, then the algorithm behind it is Algorithm 1 (Opt) from "Selective review of offline change point detection methods".Both have a time complexity of the order of T^2 (where T is the length of the signal). However, the first one has a memory complexity of the order of T and T^2 for the second.