python - Processing musical genres using K-nn algorithm, how to deal with extracted feature? -
I am developing a small device that is able to classify music genres. To do this, I would like to use a K NN algorithm (or some other, but it sounds great) and I am using python-yaafe
for convenience.
My problem is that, when I remove a feature from my song (example: mfcc) because my songs are 44100 hj-samples, I have lots of 12-value-array (sample window Number), and I really do not know how to deal with it. Is there a way to get the value of only one representative per attribute and per song?
One approach would be to take at least RMS energy value as a parameter for classification.
Instead of using the full music file for classification, you should use a music section. Theoretically, part of the 30-second music, starting after the first 30 seconds of music, is the best representative for style classification.
So instead of taking the entire array, you can consider the time that this time is related to the window, 30sec- 59sec. Calculate the RMS energy of different signals for each music file, the average in full time. You can also keep in mind other features, e.g. To use MFCC MFCC, you can go for the average value of all the signal windows for a particular music file. Make a feature vector out of it
You can use the difference between the features as the distance between data points for classification.
Comments
Post a Comment