Posted in

Acoustic Noise Classification Soup

1. Main Dish (Idea): This recipe aims to create a predictive soup that can accurately classify different acoustic regimes (types of sound environments) based on sensor data. The final product is a trained classification model ready to predict the noise regime of new, unseen sensor data.

2. Ingredients (Concepts & Components):

  • Raw Acoustic Data: Raw .anc files containing sensor readings from various acoustic environments.
  • Pandas: A sturdy data frame used to hold the time series data.
  • NumPy: An array of numbers used for making the code efficient
  • Decision Tree Classifier: The main source of prediction
  • Scikit-learn (sklearn): A tool set of ML algorithms that helps us create the Decision Tree Classifier
  • Training & Testing Split (From sklearn): A mix of data used to properly make the Decision Tree

3. Cooking Process (How It Works):

  1. Gather Ingredients: Collect all raw .anc files. These will be the prime source of data.
  2. Data Conversion and Cleaning (ANC to CSV):
    • For each .anc file in a specified directory, open it and read the data.
    • Reshape the data: Assuming each frame consists of 7 data points, extract data for every frame.
    • Create pandas DataFrames from each set of data.
    • Combine all the DataFrames of the 7 data points as columns into a single DataFrame.
    • Remove incomplete columns (containing NaN values).
    • Add a ‘Regime’ column derived from the filename (indicating the type of acoustic regime).
    • Save the combined DataFrame into a .csv file, with the filename derived from the original .anc file.
    • Repeat for another set of .anc files in a different directory (‘ancFilesPlane2’), saving the results into a separate directory (‘csvFilesP2’).
  3. Data Preparation: Load the saved .csv data using Pandas. Extract the features (sensor readings) and labels (acoustic regimes).
  4. Training and Testing Prep: Mix the data well, splitting it into training and testing sets. 70% of the data goes into the training pot, while 30% is set aside for testing the final flavor.
  5. Decision Tree Creation: Make the Decision Tree
  6. Taste Test (Prediction): Use the trained Decision Tree Classifier to predict the acoustic regimes for the test dataset.
  7. Flavor Check (Accuracy): Compute the accuracy of the model by comparing the predicted regimes with the actual regimes in the test set.
  8. Repeat: Repeat steps 1-7 for each set of data

4. Serving Suggestion (Outcome):

The finished Acoustic Noise Classification Soup delivers a trained Decision Tree model capable of accurately classifying acoustic environments.

Leave a Reply

Your email address will not be published. Required fields are marked *