deepcharles / ruptures

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

How to select a proper method for detecting onset of signals? #239

Closed yijun1994 closed 2 years ago

yijun1994 commented 2 years ago

I have a need for detecting change point of seismic waves, the onset seem quite obvious by visual inspection. But costAR and costL2 seem failed to detect the change point. Could you give me some suggestions about how to select a proper cost function among presented ones?

oboulant commented 2 years ago

Hi @yijun1994 ,

Thx for your interest in ruptures.

Would you have a visual graph of those data ?

In the mean time, you can find in the documentation User Guide the list of all the cost function available in ruptures : https://centre-borelli.github.io/ruptures-docs/user-guide/

Screenshot 2022-02-28 at 11 21 11
yijun1994 commented 2 years ago
截圖 2022-02-28 下午4 21 12

The visual graph of some signal samples is displayed above. Actually, they are earthquake signals.

deepcharles commented 2 years ago

To detect changes in amplitude, you can use CostNormal. You can also transform you signal to only keep its enveloppe (see here) and use CostL2 on the transformed signal.

Hope this helps

yijun1994 commented 2 years ago

Thanks! I also employed kernel-based (Gaussian) method to identify the change point. I found it useful but not so precise. I am wondering if the parameters I set is not right.

截圖 2022-02-28 下午5 22 50
deepcharles commented 2 years ago

The detected changes might not be at the exact location you want, because there is a small amplitude phase between the flat phase and the full amplitude phase. Some ah-hoc post-processing might be needed in any case.

yijun1994 commented 2 years ago

is 'ah-hoc post-processing' a specific method in signal processing?

deepcharles commented 2 years ago

No, it is whatever method you can find to add more precision if the detected changes are a bit "off".

deepcharles commented 2 years ago

Closing for now. Feel free to reopen.