This project aims to predict the country of origin for a song based on its features. We use a machine learning model trained on a dataset containing various song attributes.
- Data: We used a HuggingFace dataset containing song features (check out the link for information on what does each feature mean), and a MusicBrainz dataset containing country information of artists.
- Feature Engineering: We processed the data to obtain the country of origin for each song whose artist's country was known.
- Model Training: We trained an XGBoost model to predict the country of origin based on song features.
- Inference: Once the model was trained, all songs (those with known artist country and those without) were saved without the country of origin. When a song is searched, the model predicts the country of origin based on the song features (no matter if the artist's country is known or not) and the 3 countries with the highest probability are shown.
- Explainability: We provide SHAP values to explain the model's decisions.
- Accuracy: The model has an accuracy of 70% on the test set.
- Clone the repository
git clone https://github.com/FerranAD/songmap.git
cd songmap- Install the requirements (Python 3.10.13 as used in the project)
pip install -r requirements.txt- Clone the repository
git clone https://github.com/FerranAD/songmap.git
cd songmap- Run docker compose ๐
docker compose up