In this project, we will build a text classification model on song lyrics. The task is to predict the artist from a piece of text.
In this project, we will build a text classification model on song lyrics. The task is to predict the artist from a piece of text.
from sklearn.metrics import ConfusionMatrixDisplay
ConfusionMatrixDisplay.from_predictions(y_test, predictions, normalize=None)
- python 3.9.7
- Jupyter Notebook
- Kaggle
- Pandas
- numpy
- Matplotlib
- seaborn
- Sklearn
- web scarping
- Regular Expression
- Parsing HTML
- Bag of Words
- Class Imbalance
- Naive Bayes
The code for this project is seperated in two files:
-
Data file: where I collected and created my data.
-
lyrics_Project: jupyter notebook conatining the code for the prediction.
In this project, you have to create your data.
-
Go to www.lyrics.com
-
Pick two artists to collect their songs and lyrics (I chose Eminem and Rihanna for my project ). Try not to pick artists that have a high simlarity in their songs.
Note: You can find the code for collecting and creating data in Data/Create lyrics Data