Ты просто лучший. Я из России, но я смотрю тебя, слушаю тебя. Твой перевод с английского на русский намного понятней, чем читать учебники на русском языке. Спасибо, что так доходчиво и с интересом рассказываешь. Мне все понятно!!! Ты просто лучший!
Ахах, я тоже и з России, у меня на экзе был вопрос по вейвлет-преобразованию, я во время подготовки все что можно в ру-сегменте прогуглила, и статьи читала, и книги разные пробовала по анализу сигналов, так и не смогла нормально понять эту тему😩, в общем, как и ожидалось, мне пропался в билете именно этот вопрос (закон Мерфи), так вот я не смогла на него внятно ответить и препод отправил на пересдачу. Снова пытаюсь "раскусить" эту тему, и именно этот чел объясняет все доходчиво, я нашла его статьи на Medium. Благо английский мне позволяет свободно читать и понимать, вот готовлюсь, завтра иду на пересдачу, уверена, что вейвлет-преобразование (и Фурье-преобразование тоже) смогу рассказать на ура.
I would have liked to get a closer view of the graphics and code, but nevertheless this is really among the most intuitive and concise videos on wavelets on the scene. Nice job.
Hi , Shawhin talebi I didn't understand what are those scales you plot next to the ECG signal and what is their relationships with coefficients T(m,n) in the mathematical formula
Hi Momomt, thanks for your question! T(m,n) is the coefficient corresponding to the basis wavelet with scale m and location n. Scale sets how "stretched" or "squished" the wavelet is, while the location sets where the wavelet is positioned. The first plot shown in the example, shown these coefficents for each choice of scale (e.g. 2^1, 2^2, 2^3, ...) and each choice of location i.e. time (x-axis). I hope the clears things up!
Do you think I should use Wavelet Transform for EEG (electroencefalogram) data or should I use Fast fourier Transform? how do you chose? Thanks for the video and the code.
The answer to your question is yes. Both are good! Each extract different information. Wavelet transform does a good job at capturing localized oscillations (like a blip or a chirp) in time series. FFT is great at getting global frequency information, meaning oscillations that persist over the whole signal. You can also "chop up" your EEG signals into epochs in which you perform an FFT, or even further, do sliding window over the entire signal and compute the FFT at each instance. Hope that helps!
That's a good question, cause I had to look it up. According to wikipedia, for Daubechies wavelets the number in db1 refers to the number of vanishing moments. For Symlets, these are created from Daubechies wavelets so I assume sym4 means it is generated from the db4 wavelet.
Hi , I have a question, does this woks on ECG signal that are "changing"? Like CPET(Cardio- pulmonary Exercise Testing) for example. Those ECG contains three stage, resting phase -> exercise phase -> recovery phase, So the heartbeat rate should be changing a lot, will MODWT still work on these kind of data?
That’s a good question! The short answer is yes. Ultimately it comes down to what you are after. If it is to find r peaks, like we did here, it shouldn’t be an issue. Hope that helps!
سلام خیلی عالی و خیلی ممنون. فقط ببخشید من آشنا نیستم به این موضوع ولی نیاز دارم روی میکروکنترلر که یک سیگنال رو داره دریافت میکنه استفاده کنم. اول اینکه امکانش هست یا اینکه برای حذف نویز روی میکروکنترلر نیست؟ و اینکه میشه اگر لطفا یه نمونه از این فانکشن توی c/c++ بهم معرفی کنین؟
Thank you for your comment! I'm sorry I don't any experience with any c/c++ libraries for wavelets. A basic Google search gave the following: stackoverflow.com/questions/9606458/looking-for-a-good-c-c-wavelet-library-for-signal-processing Hope that helps!
After decomposing the ECG signal of 0.5-48 Hz frequency into 3 levels, I was expecting to see the frequency range of the different levels of detail coefficients to be different i.e. say for det coeff 1, i was expecting the PSD plot of the signal to give frequency range from 24.5 - 48 Hz and so on. But this was not the case. The PSD plot gave the range as 0 - 50 Hz. Can you tell me why?
@@ShawhinTalebi The code is as follows: wavelet_name = 'db6'; decomposition_level = 3; signal = normal_segments_1; [numRows, ~] = size(signal); coefficients = cell(1, numRows); approx_coeffs_n1 = cell(decomposition_level, numRows); detail_coeffs_n1 = cell(decomposition_level, numRows); for i = 1:numRows current_segment = signal(i, :); [c, l] = wavedec(current_segment, decomposition_level, wavelet_name); coefficients{i} = c; for level = 1:decomposition_level approx_coeffs_n1{level, i} = appcoef(c, l, wavelet_name, level); detail_coeffs_n1{level, i} = detcoef(c, l, level);
end end Here the signal is normal_segments_1, an ecg signal of frequency range 0 - 48.5 Hz. I defined cells to store the 3 levels of detailed and approximate coeffecients. I was expecting to see different frequency range for different sub bands.
Thank you! I’m sorry, I don’t have any example code ready to go. Doing a cwt in matlab or python should be straightforward. Matlab has a built in function and python has the PyWavelets module with an implementation. Hope that helps!
Hi there, that’s a good question! I had look up the source code. It looks like scipy does a “simple comparison of neighboring values”. Here’s a link to the source: github.com/scipy/scipy/blob/v1.7.0/scipy/signal/_peak_finding.py#L723-L1003
I'm disappointed about the code/repo as it is in a language I do not know and it seems that the repo does not implement a wavelet transform but rather the wavelet transform is part of this mysterious language. Would be great if the repo had a readme-file which would include a link to the language it is written in.
Thanks for raising that point Mathias. The code is in MATLAB, and indeed the wavelet transform used is a canned function. More info can be found here: www.mathworks.com/help/wavelet/ref/modwt.html
Hi there, thanks for your comment! I haven't done much with 2D wavelets, but I know the MATLAB documentation has some instructive examples. Example 1: www.mathworks.com/help/wavelet/ref/dwt2.html#d123e27291 Example 2: www.mathworks.com/help/wavelet/ug/haar-transforms-for-time-series-data-and-images.html
More in this series 👇 - Time series & Fourier Transform: ruclips.net/video/mj86XmfOniY/видео.html - Fast Fourier Transform: ruclips.net/video/rPUytg38b6Q/видео.html Read more: towardsdatascience.com/the-wavelet-transform-e9cfa85d7b34?sk=d74348262cd7d9975794d5e73d5348d8
Ты просто лучший. Я из России, но я смотрю тебя, слушаю тебя. Твой перевод с английского на русский намного понятней, чем читать учебники на русском языке. Спасибо, что так доходчиво и с интересом рассказываешь. Мне все понятно!!! Ты просто лучший!
Thank you for your comment and watching! I'm glad it was helpful 😁
Ахах, я тоже и з России, у меня на экзе был вопрос по вейвлет-преобразованию, я во время подготовки все что можно в ру-сегменте прогуглила, и статьи читала, и книги разные пробовала по анализу сигналов, так и не смогла нормально понять эту тему😩, в общем, как и ожидалось, мне пропался в билете именно этот вопрос (закон Мерфи), так вот я не смогла на него внятно ответить и препод отправил на пересдачу. Снова пытаюсь "раскусить" эту тему, и именно этот чел объясняет все доходчиво, я нашла его статьи на Medium. Благо английский мне позволяет свободно читать и понимать, вот готовлюсь, завтра иду на пересдачу, уверена, что вейвлет-преобразование (и Фурье-преобразование тоже) смогу рассказать на ура.
Awesome video ... never knew wavelets were this powerful.
Definitely, they are a great thing to have in the toolbox. Thanks for your comment!
dude more videos about signal processing would be awesome!! this is great
Thanks Gabriel! Glad it was helpful, I’ll keep that in mind!
I would have liked to get a closer view of the graphics and code, but nevertheless this is really among the most intuitive and concise videos on wavelets on the scene. Nice job.
Thanks Vector! Code and plots are available at the GitHub: github.com/ShawhinT/RUclips-Blog/tree/main/waveletTransform
Thanks! you are doing that so much better than Wikipedia.
I can't wait to Wavelet Transform things now!
Happy to help
ok! very simple and clear explanation with example 👍
Thank you so much!
Epic, very useful for my BCI class
Thanks, glad to hear!
Hi , Shawhin talebi I didn't understand what are those scales you plot next to the ECG signal and what is their relationships with coefficients T(m,n) in the mathematical formula
Hi Momomt, thanks for your question! T(m,n) is the coefficient corresponding to the basis wavelet with scale m and location n. Scale sets how "stretched" or "squished" the wavelet is, while the location sets where the wavelet is positioned. The first plot shown in the example, shown these coefficents for each choice of scale (e.g. 2^1, 2^2, 2^3, ...) and each choice of location i.e. time (x-axis). I hope the clears things up!
@@ShawhinTalebi thank you :)
Do you think I should use Wavelet Transform for EEG (electroencefalogram) data or should I use Fast fourier Transform? how do you chose?
Thanks for the video and the code.
The answer to your question is yes. Both are good! Each extract different information.
Wavelet transform does a good job at capturing localized oscillations (like a blip or a chirp) in time series. FFT is great at getting global frequency information, meaning oscillations that persist over the whole signal. You can also "chop up" your EEG signals into epochs in which you perform an FFT, or even further, do sliding window over the entire signal and compute the FFT at each instance. Hope that helps!
@@ShawhinTalebi Thanks!
شكرا ✅👍🏼
Thanks Shawhin joon, was very helpful
Glad it was helpful!
hi sir, what does 4 means in sym4
is there any special meaning behind numbers in wavelets
Eg: sym1,sym2,....,Db1,Db2,...
That's a good question, cause I had to look it up. According to wikipedia, for Daubechies wavelets the number in db1 refers to the number of vanishing moments. For Symlets, these are created from Daubechies wavelets so I assume sym4 means it is generated from the db4 wavelet.
Hi , I have a question, does this woks on ECG signal that are "changing"? Like CPET(Cardio- pulmonary Exercise Testing) for example.
Those ECG contains three stage, resting phase -> exercise phase -> recovery phase, So the heartbeat rate should be changing a lot, will MODWT still work on these kind of data?
That’s a good question! The short answer is yes. Ultimately it comes down to what you are after. If it is to find r peaks, like we did here, it shouldn’t be an issue.
Hope that helps!
@@ShawhinTalebi Thanks a lot!
definitely gonna try this on my python work
Great video! Thanks for sharing!
Thanks for watching, appreciate it!
very nice and informative video. Thanks :)
Thank you! Happy to help
سلام خیلی عالی و خیلی ممنون.
فقط ببخشید من آشنا نیستم به این موضوع ولی نیاز دارم روی میکروکنترلر که یک سیگنال رو داره دریافت میکنه استفاده کنم. اول اینکه امکانش هست یا اینکه برای حذف نویز روی میکروکنترلر نیست؟
و اینکه میشه اگر لطفا یه نمونه از این فانکشن توی c/c++ بهم معرفی کنین؟
Thank you for your comment! I'm sorry I don't any experience with any c/c++ libraries for wavelets. A basic Google search gave the following: stackoverflow.com/questions/9606458/looking-for-a-good-c-c-wavelet-library-for-signal-processing
Hope that helps!
@@ShawhinTalebi Thank you
very nice talk, great job.
Glad you liked it!
After decomposing the ECG signal of 0.5-48 Hz frequency into 3 levels, I was expecting to see the frequency range of the different levels of detail coefficients to be different i.e. say for det coeff 1, i was expecting the PSD plot of the signal to give frequency range from 24.5 - 48 Hz and so on. But this was not the case. The PSD plot gave the range as 0 - 50 Hz. Can you tell me why?
Could you share your code? This seems like something specific to the decomposition's implementation.
@@ShawhinTalebi The code is as follows:
wavelet_name = 'db6';
decomposition_level = 3;
signal = normal_segments_1;
[numRows, ~] = size(signal);
coefficients = cell(1, numRows);
approx_coeffs_n1 = cell(decomposition_level, numRows);
detail_coeffs_n1 = cell(decomposition_level, numRows);
for i = 1:numRows
current_segment = signal(i, :);
[c, l] = wavedec(current_segment, decomposition_level, wavelet_name);
coefficients{i} = c;
for level = 1:decomposition_level
approx_coeffs_n1{level, i} = appcoef(c, l, wavelet_name, level);
detail_coeffs_n1{level, i} = detcoef(c, l, level);
end
end
Here the signal is normal_segments_1, an ecg signal of frequency range 0 - 48.5 Hz. I defined cells to store the 3 levels of detailed and approximate coeffecients. I was expecting to see different frequency range for different sub bands.
Great video, learned a lot.
Glad it was helpful!
great video! do you have any example of continuos wavelet transform?
Thank you! I’m sorry, I don’t have any example code ready to go. Doing a cwt in matlab or python should be straightforward. Matlab has a built in function and python has the PyWavelets module with an implementation. Hope that helps!
Thanks for the video! Does peakfind function in python/matlab use wavelet transform to find peaks typically?
Hi there, that’s a good question! I had look up the source code. It looks like scipy does a “simple comparison of neighboring values”.
Here’s a link to the source: github.com/scipy/scipy/blob/v1.7.0/scipy/signal/_peak_finding.py#L723-L1003
Amazing video
You are too kind, thank you!
I'm disappointed about the code/repo as it is in a language I do not know and it seems that the repo does not implement a wavelet transform but rather the wavelet transform is part of this mysterious language. Would be great if the repo had a readme-file which would include a link to the language it is written in.
Thanks for raising that point Mathias. The code is in MATLAB, and indeed the wavelet transform used is a canned function. More info can be found here: www.mathworks.com/help/wavelet/ref/modwt.html
Thank you so much for your amazing video,
If it possible can you share with us some helpful documents specially for WT for 2D/image ?!!!
Hi there, thanks for your comment! I haven't done much with 2D wavelets, but I know the MATLAB documentation has some instructive examples.
Example 1: www.mathworks.com/help/wavelet/ref/dwt2.html#d123e27291
Example 2: www.mathworks.com/help/wavelet/ug/haar-transforms-for-time-series-data-and-images.html
ruclips.net/p/PLOUHOQsIOpRF43dwJzVEeoFdEOlf7-fWW
SUBSCRIBE THIS CHANNEL FOR COMPLETE WAVELET TRANSFORM VIDEOS
More in this series 👇
- Time series & Fourier Transform: ruclips.net/video/mj86XmfOniY/видео.html
- Fast Fourier Transform: ruclips.net/video/rPUytg38b6Q/видео.html
Read more: towardsdatascience.com/the-wavelet-transform-e9cfa85d7b34?sk=d74348262cd7d9975794d5e73d5348d8
hello, do you work with Matlab?
Yes the example here uses Matlab
@@ShawhinTalebi great give me your mail please.. I have a paper i need your help
Feel free to message me here: www.shawhintalebi.com/contact
@@ShawhinTalebi Thanks
can you share with me your slides?
Sure thing! Just added it to the GitHub.
github.com/ShawhinT/RUclips-Blog/blob/main/waveletTransform/wt_slides.pdf
اريد ان تساعدني
interesting
0:07 lol
First
Again
Thank you