-2

I am new to machine learning. I have implemented a machine learning model which detects sound (for example: horn, siren, hammer etc) and predicts the type of sound. I have to physically test the model on actual sound of any object. How do I go about it?

6
  • 1
    By presenting your model with various sound waves to see if it produces the responses you expect. – Robert Harvey Jul 12 '18 at 23:34
  • Wear ear protection and produce all kinds of noises your model should know. Don't forget to add a microphone so it hears the sounds you make. – Hans-Martin Mosner Jul 13 '18 at 5:18
  • 1
    I have the whole code in jupyter notebook. How do I present sound waves to jupyter notebook? Is there some API or something which will help me? – Neel Nath Jul 13 '18 at 18:23
  • What do you mean with “physically”? A model is just code/data. A recording of sound waves is also just data. Are you asking how you can continually listen to surrounding sounds via a microphone? – amon Jul 13 '18 at 18:56
  • 1
    Yes, how can I make the model continuously listen to the sound? – Neel Nath Jul 13 '18 at 19:48
3

Model validation is an important part of any machine learning application. To validate your model, you have to split your available data into a training set and a validation set. You then train your model on the training set, and use the validation set to calculate performance statistics.

It seems you have a classification problem (given a sound, is it a horn, siren, or hammer?). For the samples in the validation set, you will have to know the true classification. You can then compare the true classification to the predicted classification of your model, and can calculate error statistics like false positives (a sound was classified as a siren but wasn't) or false negatives (a sound was classified as something else but was in fact a siren). If your classification model outputs continuous predictions (i.e. performs fuzzy classification), then you can also use measures like the mean squared error as an indicator of model performance.

A problem with the training set – validation set split is that the training set necessarily becomes smaller, and that the model is not trained on all available samples. There are cross-validation approaches like Leave-One-Out Cross Validation or k-Fold Cross Validation that use the available data more efficiently. Techniques like cross-validation or bootstrapping can also be used to calculate confidence intervals for your performance measures.

1
  • I have trained and validated the model. How can I physically test the model after everything is done? – Neel Nath Jul 13 '18 at 18:25

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.