I need to classify whether a product sound "good" and "bad" based on FFT of its audio recording. The FFT magnitudes are shown for frequencies from 0 to 7khz, with a frequency resolution of 5 hz, so there are lots of bins.

The problem is there are many ways a product can sound "good", and many ways a product can sound "bad". It's hard to come up with an explicit rule based on FFT magnitudes. Moreover, the recordings are done at a noisy factory environment where ambient noise can be random, although it only shows significant magnitudes at <1500 hz. But sometimes some machine sound can cause a peak at higher frequencies.

Therefore, I don't think a regression or random forest based on FFT magnitudes would work well. KNN seems ideal for this because as long as I have training data recorded for all different kinds of "good" and "bad" products, under various ambient conditions, it seems this problem is just a matter of finding the nearest neighbors, with the distance defined as Euclidean distance (of magnitudes) in a high dimension space (each frequency bin is a dimension).

I feel KNN is perfectly suited for this because I don't need to calibrate the equipment or set any reference decibel level. But if "good" and "bad" products tend to have certain profiles (different peaks at different frequencies), then even with some ambient noise which can alter the magnitudes to an extent, KNN should still be more robust than a parametric model.

Is my understanding of the merit of KNN over parametric model valid in this scenario? Should I try to reduce the dimensions prior to KNN?



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.