All right, so this is my notebook and the data set that I'm using here comes from the urban sound data set. It's a freely available data set. You can go. You can download it, play with it. There are hundred of examples from different urban noises that you can analyze and play with. And what I've done here is, I have sampled two categories, two different types of sounds. One is coming from air conditioners, the other from drills. And I have selected 20 audio clips from each category. So I have something like 40 clips in total. And I can show them to you. So this is the contents, because they're in a zip file. This is the contents of my zip file so I have audio data. In the AC directory I have the air conditioners. In the drill directories I have the drills, right? And these are the ways files I will be working with. So what I do now is I kind of first read the data. And once this is done, I notice that some of the clips have different sampling rate. So what I do here is I kind of re-sample them so I have everything the same sampling rate, right? Okay, I also noticed that some of the recordings are in stereo. Other recordings are mono so I kind of convert everything to mono to keep it simple. Okay, and I want to give you an example. So this is an audio clip from the first category. This is an air conditioner and that's a plot that comes from, as you can see, the time domain, right? We had those spikes here when, I don't know, the AC, maybe the pump is running or the fan is spinning or something. But we have these rhythmic noise here, right? And there is a clip from the other category. That's the drill. You see kind of a more constant signal, probably and also louder because this one goes up to 0.6. This one goes to 0.4. They're probably not on the same scale, but it doesn't matter anyway. So what I would do now is I'm using this library PyWT, which is, again, a freely available library for computing wavelets in python. And what I do is I kind of parse just a couple of seconds actually from each audio clip. Because if you look at the AC data for example, I'm just interested in the beginning. I just want to capture these spikes because they are characteristic for the signal. I don't really have to go over the entire signal. So I'm just looking at the first of 25,000 data points. This should be sufficient. I want to keep things simple and it's pretty much the same here with the drill. Once I get up to 25,000 it kind of, it doesn't make sense to continue. So what I do is I kind of compute the wavelet coefficients and then I plot them. I plot them using two scaleograms and you can immediately see. Now you know how to read this. For the AC signal we have these three spikes in the lower scales at about, what is this, 15,000? So if I go back to the signal, here, about 15,000, we have these three very characteristic spikes, right? And if you look at the other signal that comes from the drill, well we have this spike here, but you know it's kind of all over the place, plenty of different frequencies mixed together. All right, and what I will do know I will also do a 3D plot just to get a better view. And this will take a while because if you think about this, now we have a scale that goes from 0 to 100. We have 25,000 points in the signal data points. So we have to multiply 25,000 by 100 to get the number of coefficients. And that's just the first plot, right? And we have two of them because we have two audio clips. So this will take a while but it will give you really nice view of how these two signals differ. So let's give it a time. It's ready. So on the left hand side we have our AC. And you can see these spikes here in the the high frequency area of the plot. And on the right hand side you'll see this drill which is all over the place with this spike here. Where is this? Close to 25,000 if we go back to the signal. There it is, this guy here, right? Okay, and next thing I do, very simple really. I want to keep it simple for this example. I just apply principal component analysis and just a single component using the scale. So instead of having to work with 2 million coefficients, I get something like 100. And I do this for each audio clip in my data set, so this will take a while. And then once I'm done, I split the data set into training and test at the ratio of 80:20. And then I train an SVM classifier, and then I make predictions and see what the accuracy of my classifier is. So there the date is now split. Now I'm feeding my support vector machines model. And then I will make a prediction, which is surprisingly accurate. So this is one way of using wavelet transform to extract features from really complex signals generated by non-stationary processes.