This repo contains two machine learning mini-projects developed as part of the Principles of Machine Learning module during my MSc in Big Data Science at Queen Mary University of London.
The task was to classify audio recordings — created by students whistling or humming — using classical ML techniques. The dataset was provided by the course lecturer and consisted of .wav files with labeled content.
-
miniproject_basic.ipynb
Binary classification: humming vs. whistling -
miniproject_advanced.ipynb
Multiclass classification: classify one of three melodies (Harry Potter, Star Wars, Pink Panther)
- Python, NumPy, Pandas, Matplotlib
librosafor audio feature extractionscikit-learnfor ML models and evaluationxgboostfor gradient boosting- Jupyter Notebooks
- Logistic Regression
- Support Vector Machine
- Naive Bayes
- Multilayer Perceptron (MLP)
- XGBoost
Each model was evaluated using accuracy, confusion matrix, Cohen's Kappa, and Matthews Correlation Coefficient.
- Mel-frequency cepstral coefficients (MFCCs)
- Spectral bandwidth
- Tempo estimation
Features were normalized using MinMaxScaler.
This project was developed and tested using Google Colab.
To run it:
- Open either
miniproject_basic.ipynborminiproject_advanced.ipynbin Colab - Ensure the required packages listed in
requirements.txtare available in your runtime
Note: The original dataset links provided in the notebooks are no longer active. To run the project, you will need to supply your own audio data and adjust the file paths accordingly.
Note for non-Colab users:
This project assumes a Google Colab environment and uses Google Drive paths (e.g.,/content/drive/MyDrive/...).
To run it locally, you’ll need to:
- Remove or comment out
drive.mount()- Replace all
/content/drive/...paths with your local equivalents
You can install everything using:
pip install -r requirements.txt