<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Souradeep Ghosh on Medium]]></title>
        <description><![CDATA[Stories by Souradeep Ghosh on Medium]]></description>
        <link>https://medium.com/@ghoshsou?source=rss-1cb4f934c043------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*aRzhl-D3yAyGdnzB</url>
            <title>Stories by Souradeep Ghosh on Medium</title>
            <link>https://medium.com/@ghoshsou?source=rss-1cb4f934c043------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 04:25:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ghoshsou/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Mood Insights from Lyrics: Unveiling the Emotional Landscape of Music]]></title>
            <link>https://medium.com/@ghoshsou/mood-insights-from-lyrics-unveiling-the-emotional-landscape-of-music-715490b4a1a8?source=rss-1cb4f934c043------2</link>
            <guid isPermaLink="false">https://medium.com/p/715490b4a1a8</guid>
            <category><![CDATA[mood-detection]]></category>
            <category><![CDATA[lyrics]]></category>
            <category><![CDATA[sentiment-analysis]]></category>
            <category><![CDATA[nlp]]></category>
            <category><![CDATA[data-mining]]></category>
            <dc:creator><![CDATA[Souradeep Ghosh]]></dc:creator>
            <pubDate>Thu, 12 Oct 2023 02:02:54 GMT</pubDate>
            <atom:updated>2023-11-02T03:48:02.562Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Poster" src="https://cdn-images-1.medium.com/max/1024/1*6e5PJqsPlJq87rmCjJ0sVA.jpeg" /></figure><h3><strong>Introduction</strong></h3><p>Music is a unique medium that crosses cultural barriers and profoundly speaks to the human soul. It can move us to tears of joy, happiness, or nostalgia as we dance with delight. The skill of songwriting, which uses lyrics as a vehicle to express feelings, is at the core of this emotional bond between music and listeners. Our initiative, “Mood Insights from Lyrics,” takes an enthralling trip into the emotional depths of music, concentrating on the lyrical component, in this age of technology and data-driven insights.</p><p>Imagine a world in which we can analyze song lyrics to comprehend the complex emotions they represent in addition to appreciating music for its melody. Our team, which consists of Priya Kumari, Jannat Arora, and Souradeep Ghosh, is specifically working toward achieving that. We are using innovative natural language processing (NLP) and sentiment analysis techniques to understand the mood, emotions, and sentiments expressed in music lyrics.</p><p>As we continue our investigation, we not only reveal the emotional expressions in music that are hidden beneath the surface but also improve the listening experience for millions of fans. Furthermore, our study has broad ramifications that can help songwriters create emotionally compelling lyrics and advance our knowledge of the ways that music affects and reflects human emotions.</p><p>We will give a thorough explanation of our project in this blog post, summarizing pertinent academic papers, emphasizing examples, outlining the datasets we’re using, and including links to external demo codes that support our goals. Modern NLP approaches are used in our strategy, and we’ll measure the effectiveness of our model using measures like accuracy, precision, recall, and F1-score. Join us as we embark on an exciting trip into the heart of music, where data and emotion converge to produce a symphony of revelations.</p><h3><strong>Related Work — Research Papers</strong></h3><ol><li><a href="https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8286111"><strong>Review on Sentiment Analysis on Music</strong></a> (Shukla, Stuti, Pooja Khanna, and Krishna Kant Agrawal, 2017) Shukla et al.’s article “Review on Sentiment Analysis on Music” offers a thorough overview of this fascinating area and offers insights into how sentiment analysis of music might be used to improve our musical experiences. The importance of sentiment analysis, a branch of natural language processing (NLP), in comprehending the emotions expressed by music is highlighted in the opening paragraphs of the study. It acknowledges that music has a special capacity to inspire a variety of feelings, from happiness and nostalgia to sadness and enthusiasm, and it seeks to investigate how computational approaches might assist us in quantifying and analyzing these emotional qualities. The understanding of the variety of approaches and procedures used in sentiment analysis of music is one of the main lessons to be learned from this work. From lexicon-based systems that rely on predetermined sentiment word lists to more sophisticated techniques utilizing machine learning and deep learning algorithms, Shukla et al. cover a variety of sentiment analysis methodologies. The difficulty of the task and continuous efforts to increase the precision of sentiment analysis in music are highlighted by this diversity. The authors also stress the importance of sentiment analysis in a variety of fields, such as music recommendation systems, where knowing a user’s emotional state can result in more tailored song selections. It also has uses in music therapy, where the emotional impact of music can be customized to meet the individual needs of patients. Overall, by describing the landscape of sentiment analysis in music, the “Review on Sentiment Analysis on Music” offers a solid foundation for our study. It emphasizes how crucial it is to comprehend the emotional motivations behind music, a notion that is strongly aligned with our goal to explore the emotional landscape of song lyrics and improve the music-listening experience</li><li><a href="https://escholarship.mcgill.ca/downloads/1831cr00g?locale=en"><strong>Music Emotion Recognition on Lyrics Using Natural Language Processing</strong></a><strong> </strong>(Zhou, Yinan, 2022) The work “Music Emotion Recognition on Lyrics Using Natural Language Processing” by Yinan Zhou is a state-of-the-art investigation into the emotional aspects of music, with a particular focus on lyrics, in the field of music and NLP. This study, which was published in 2022, makes a substantial contribution to our knowledge of how to use NLP approaches to identify and measure the emotional content of song lyrics. Zhou’s study starts by recognizing the critical part lyrics play in the emotional impact of music. Not only are lyrics words set to music, but they are also emotional conduits that may take a tune and turn it into a journey. Zhou sets out on a mission to use NLP to recognize musical emotions after realizing this. The use of sophisticated natural language processing (NLP) methods, including word embeddings and deep learning models, to analyze the emotional nuance contained in songs is one of the paper’s main conclusions. Zhou explores the challenges of effectively expressing the emotional meanings of words through representation. This strategy is ideal for achieving the goals of our study, which is to use NLP to analyze linguistic nuances in song lyrics. Zhou’s research also highlights the useful uses of music emotion recognition, such as improving user interfaces for music recommendation systems. Personalized music recommendations that better fit a listener’s preferences and present mood can be created by analyzing the emotional aspects of songs through their lyrics.</li><li><a href="https://aclanthology.org/D12-1054.pdf"><strong>Lyrics, Music, and Emotions Using Natural Language Processing</strong></a> (Mihalcea, Rada, and Carlo Strapparava, 2012) At the nexus of linguistics, music, and natural language processing (NLP), Rada Mihalcea and Carlo Strapparava’s 2012 study “Lyrics, Music, and Emotions Using Natural Language Processing” is a seminal work. This essay opens the door to a greater comprehension of the emotional impact of music by providing insightful analysis of the ways in which lyrics, in conjunction with melodic aspects, express feelings and emotions. Mihalcea and Strapparava begin their study by pointing out that lyrics enhance the emotional impact of music, which is already a medium for expressing feelings. The composer’s intentions and the listener’s emotions are communicated verbally through the lyrics. Taking this into consideration, the writers investigate how NLP methods can reveal the complex relationship that exists between lyrics, music, and feelings. This paper’s creation of an extensive dataset of song lyrics with manual emotional label annotations is one of its main achievements. This dataset turns out to be a priceless tool for testing and developing models that seek to identify emotions in song lyrics. These datasets are essential to our work since they provide the basis for developing our algorithms for sentiment analysis and emotion recognition. The writers also explore the complex link between lyrics and music, pointing out that while music can elicit emotions on its own, lyrics provide a cognitive element that intensifies these feelings. They investigate different NLP methods, such as sentiment analysis and emotion detection, to identify and identify emotional hints in songs.</li><li><a href="https://arxiv.org/pdf/1506.05012.pdf"><strong>Emotion Analysis of Songs Based on Lyrical and Audio Features</strong> </a>(Adit Jamdar, Jessica Abraham, Karishma Khanna, and Rahul Dubey, 2015) With an emphasis on the intricate interaction between lyrics and audio features in the communication of emotions inside songs, “Emotion Analysis of Songs Based on Lyrical and Audio Features” is a noteworthy addition to the discipline of music analysis. The study by Adit Jamdar, Jessica Abraham, Karishma Khanna, and Rahul Dubey illuminates the ways in which lyrical and auditory components work together to shape the emotional terrain of music. The first part of the paper acknowledges the powerful emotional impact that music can have, but it also points out that words and melodies alone are not the only means by which emotions can be expressed. Rather, the combination of the lyrics and the audio components produces a complex emotional experience. This comprehension is in line with the objectives of our project, which is to investigate the effective aspects of song lyrics while considering how well they work in conjunction with aural elements. The creation of an extensive dataset with emotional labels tagged to both lyrical and audio elements is one of the paper’s main discoveries. This dataset is a useful tool for training and testing models that attempt to fully capture the emotional aspects of music. To sum up, “Emotion Analysis of Songs Based on Lyrical and Audio Features” makes a substantial contribution to our knowledge of the ways in which audio components and lyrics work together to affect how songs make us feel. This paper’s focus on feature combination, dataset creation, and machine learning techniques fits in well with our project’s goals, which are to use lyrics to reveal mood information while considering how they can be integrated with audio features to further our comprehension of the emotional terrain of songs.</li></ol><h3><strong>Some Similar Examples</strong></h3><p><strong>1.</strong> <a href="https://www.youtube.com/watch?v=P8VJ2uCjv4s"><strong>Sentiment Analysis on lyrics of popular music</strong></a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FP8VJ2uCjv4s%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DP8VJ2uCjv4s&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FP8VJ2uCjv4s%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/32ad417a5660f3eb81dcdf87231e0c68/href">https://medium.com/media/32ad417a5660f3eb81dcdf87231e0c68/href</a></iframe><p>In the video presentation, the speaker discusses sentiment analysis applied to popular music lyrics. Sentiment analysis, a natural language processing technique, is introduced to determine whether data is positive, negative, or neutral, going beyond polarity to detect specific emotions and intentions. The importance of this analysis in understanding sentiment, especially in the context of music, is emphasized. Several types of sentiment analysis, such as graded sentiment analysis, emotion detection, aspect-based sentiment analysis, and multilingual sentiment analysis, are briefly explained. The project’s objectives involve conducting sentiment analysis on songs by famous artists from different genres. The presentation also touches upon how sentiment analysis with machine learning works, including text preprocessing and feature extraction. Features used in sentiment analysis encompass unigrams, bigrams, part of speech, function words, and word-based features. The speaker plans to create data sets for Eminem and Taylor Swift’s lyrics, and future work includes data preprocessing, sentiment analysis, result comparison, and conclusion. This presentation offers valuable insights into sentiment analysis in song lyrics in a concise manner.</p><p><strong>2. </strong><a href="https://www.youtube.com/watch?v=qAn90KEmriI"><strong>Classifying song lyrics with Hugging Face AutoNLP</strong></a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FqAn90KEmriI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DqAn90KEmriI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FqAn90KEmriI%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e9a8e7f80055ce1865cc2f5fcb676bc2/href">https://medium.com/media/e9a8e7f80055ce1865cc2f5fcb676bc2/href</a></iframe><p>In this video, Julian from Hugging Face demonstrates the process of fine-tuning a natural language processing (NLP) model to predict song lyrics’ genre. He utilizes a dataset obtained from Kaggle, comprising artist information and song lyrics. After dataset preparation, Julian fine-tunes the model using the Hugging Face AutoNLP CLI, achieving a commendable 66.8% accuracy for multi-class classification. He also created a simple web application using Gradio that allows users to input lyrics and receive genre predictions. The video highlights the effectiveness of fine-tuned NLP models in music genre classification and the user-friendly web interface to interact with the model’s predictions. You can try the web app by visiting the provided public URL and explore the code on the associated GitHub repository for further details.</p><p><strong>3. </strong><a href="https://medium.com/@anuragdhar1992/music-mood-app-2e70886ba550"><strong>Music Mood App</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n23cWDqNQiv9rLWT8asq8A.png" /></figure><p>In the blog post titled “Music Mood App” by Anurag Dhar, published on April 8, 2019, a case study is presented where a music enterprise aims to create a latest music station that allows listeners to choose songs based on their mood. To accomplish this, they utilize machine learning for classifying songs into “Happy” or “Sad” categories.</p><p>The approach is divided into two parts. In the first part, a machine learning model is built using Google’s classic modeling approach and is accessed via a REST API to predict the mood of songs. In the second part, a dynamic web application, built with Flask, fetches the top trending songs and their lyrics using the Musixmatch API. These lyrics are then passed to the model to determine the song’s mood, which is displayed on the website.</p><p>The model’s performance is assessed using a confusion matrix and F1 score, achieving a test accuracy of 73%. The web app is hosted on Heroku, allowing users to input song lyrics and discover their mood. This project demonstrates a practical application of text classification and machine learning in the realm of music mood prediction.</p><h3>A Demo Project — Explanation</h3><h4><a href="https://github.com/western11/Lyric-Mood-Identifier">Lyric mood identifier</a></h4><p><a href="https://github.com/western11/Lyric-Mood-Identifier">GitHub - western11/Lyric-Mood-Identifier: Predict the song&#39;s mood based on its lyric</a></p><p><em>Data Import and Preprocessing</em>:</p><p>The dataset contains song lyrics and their corresponding Valence values, which are used to determine the mood. The lyrics are cleaned by removing newline characters, and a binary ‘mood’ column is created based on whether the Valence is above or below 0.5, classifying songs as either positive or negative.</p><p><em>Text Cleaning and Feature Engineering</em>:</p><p>Text cleaning is done in the form of conversion to lowercase, contractions are expanded, internet slang is replaced, and word elongations and punctuations are handled. The dataset is then randomly sampled to 45,000 songs for analysis.</p><p><em>Modeling</em>:</p><p>The following models are trained to predict the mood of songs based on the processed lyrics.</p><p>- Naive Bayes</p><p>- Decision Tree</p><p>- MARS (Multivariate Adaptive Regression Splines)</p><p>- Random Forest</p><p>The models are trained on 75% of the data and tested on the remaining 25% and their respective confusion matrices is generated for the evaluation. Some model tuning is done for Decision Tree and Random Forest models, searching for the best parameters to improve model performance. This step includes grid search and cross-validation to find optimal hyperparameters.</p><p><em>Model Evaluation and Conclusion</em>:</p><p>The confusion matrices for all models are combined, and evaluation metrics like accuracy, sensitivity, specificity, precision, and F1 score are presented. The Random Forest model, both with and without tuning, is selected as the best model for predicting song moods based on lyrics.</p><h3>Our Dataset</h3><p><strong><em>Music Mood Classification Dataset Version 1.0</em></strong></p><p>We leveraged the “Music Mood Classification Dataset Version 1.0” (NJU-MusicMood-v1.0) to classify music clips into mood categories based on lyrics. This dataset includes 777 music clips categorized into “angry,” “happy,” “relaxed,” and “sad,” with samples in the training and testing set. Each clip provides lyrics in plain text files, along with time tags relative to the music’s start, facilitating exploration of the emotional nuances conveyed through song lyrics.</p><p>The dataset’s balanced mood category distribution in the training set offers a solid foundation for building and training our classification models.We primarily focused on the text data, the lyrics, and embarked on the journey to understand how the lyrical content of music can be a window into the emotional mood it conveys. We’ll discuss the data preprocessing steps in the next section.</p><h3><strong>System Description</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*sIzsD2hv16Lx_cP9_cluwA.png" /><figcaption>Genre classification model followed</figcaption></figure><h3>Data Analysis and Preprocessing</h3><p>To extract mood insights from music lyrics, a critical early step was to prepare and understand the dataset. This section covers the data preprocessing and exploratory data analysis (EDA) we conducted.</p><p><strong>Data Cleaning:</strong></p><p>To prepare the textual data for analysis, we performed the following data cleaning steps:</p><ol><li>Removing Brackets: We removed brackets and any content within them, as this text was often metadata or irrelevant to our analysis.</li><li>Replacing New Line Breaks: We replaced new line breaks with spaces, ensuring that the text was well-structured for processing.</li><li>Lowercasing: To maintain consistency and eliminate case sensitivity, we converted all text to lowercase.</li><li>Removing Punctuation: Punctuation can add noise to textual data, so we removed it from the lyrics.</li><li>Removing Extra Whitespaces: We eliminated any extra whitespaces to enhance data consistency.</li><li>Breaking Words: We handled word breaking to ensure that words weren’t incorrectly split.</li></ol><p><strong>Exploratory Data Analysis:</strong></p><p>With the data cleaned and ready, we delve into EDA to gain insights into the textual content. Specifically, we wanted to explore the frequency of words in each mood category. To visualize this, we created word clouds for each mood category, providing a visual representation of the most frequent words.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FuEdwJrv3QeKR1BXGmNqXQ.png" /><figcaption>Words cloud that were generated for all four categories</figcaption></figure><p>These word clouds not only provide an engaging visual representation of word frequency, but also offer insights into the vocabulary that might be indicative of different moods. This leads us to finding that the word ‘LOVE’ is highly prevalent in all the categories, therefore the given size.</p><h3>Model Training</h3><p>We chose to train our data on the following five ML models:</p><ul><li>Linear Support Vector Classifier</li><li>Logistic Regression</li><li>Decision Tree Classifier</li><li>Random Forest Classifier</li><li>Multi-layer Perceptron (MLP)</li></ul><p>To use these models for mood classification, we followed a well-structured process consisting of:</p><p><strong>Data Preparation</strong>: We divided the dataset into training and testing sets, denoted as X_train, y_train, X_test, and y_test. This split allowed us to train our models on one portion of the data and assess their performance on the other.</p><p><strong>Text Vectorization</strong>: We employed the Term Frequency-Inverse Document Frequency (TF-IDF) vectorization technique to convert the text data into numerical features. We used different n-gram ranges and even incorporated part-of-speech (POS) tagging into our text vectorization process to capture nuanced information from the lyrics.</p><p><strong>Model Selection</strong>: We implemented a variety of machine learning models, as described above, to perform mood classification. Each model was paired with specific TF-IDF vectorization settings, resulting in various combinations for experimentation.</p><p><strong>Model Training</strong>: We trained each model on the training data (X_train and y_train) using the respective TF-IDF vectorization settings and model algorithms. This allowed our models to learn from the training data and create a mapping between lyrics and mood categories.</p><p>We explored the capabilities of five distinct machine learning algorithms, each in tandem with various n-gram settings for text analysis. Here’s an in-depth look at the combinations we experimented with:</p><h3>Model Selection Rationale</h3><p><strong>Linear Support Vector Classifier:</strong></p><p><em>N-grams Explored</em>: Unigram, Bigram, Trigram, Unigram + Bigram, Bigram + Trigram, Unigram + Bigram + Trigram</p><p>Rationale: Linear SVC is renowned for its effectiveness in text classification tasks. We wanted to observe how it performed with varying n-gram settings to capture different levels of word and phrase relationships within lyrics. By trying different combinations of unigrams, bigrams, and trigrams, we aimed to uncover the optimal approach for mood categorization.</p><p><strong>Logistic Regression:</strong></p><p><em>N-grams Explored</em>: Unigram, Bigram, Trigram, Unigram + Bigram, Bigram + Trigram, Unigram + Bigram + Trigram</p><p>Rationale: Logistic Regression is a versatile choice for classification. In our experimentation, we aimed to determine the ideal n-gram setting that would help Logistic Regression identify the most influential textual features for mood classification. By trying various combinations, we sought a balance between simplicity and comprehensiveness.</p><p><strong>Decision Tree Classifier:</strong></p><p><em>N-grams Explored</em>: Unigram, Bigram, Trigram, Unigram + Bigram, Bigram + Trigram, Unigram + Bigram + Trigram</p><p>Rationale: Decision trees are excellent at capturing decision boundaries based on features. In our case, they could be used to pinpoint critical lyrics or word combinations that contribute to mood categorization. By exploring different n-grams, we aimed to gauge the tree’s ability to identify contextually relevant phrases.</p><p><strong>Random Forest Classifier:</strong></p><p><em>N-grams Explored</em>: Unigram, Bigram, Trigram, Unigram + Bigram, Bigram + Trigram, Unigram + Bigram + Trigram</p><p>Rationale: Random forests are ensemble methods that combine multiple decision trees. We wanted to evaluate how the Random Forest Classifier leveraged different n-gram settings to enhance the accuracy and robustness of mood classification. This exploration allowed us to assess the model’s ability to aggregate information effectively.</p><p><strong>Multi-layer Perceptron:</strong></p><p><em>N-grams Explored</em>: Unigram, Bigram, Trigram, Unigram + Bigram, Bigram + Trigram, Unigram + Bigram + Trigram</p><p>Rationale: MLP, a type of artificial neural network, excels in capturing complex patterns in textual data. By trying different n-gram combinations, we aimed to assess the model’s ability to understand the nuanced relationships between lyrics and mood categories. This exploration allowed us to uncover the hidden layers of emotion within the text.</p><h3>Evaluation Metrics</h3><p>The success of our models in music mood classification was evaluated using a set of crucial metrics:</p><ul><li><em>Accuracy</em>: Accuracy measures the overall correctness of the model’s predictions. It helps us understand how often our model correctly classified music clips into their respective mood categories.</li><li><em>F1 Score</em>: The F1 score considers both precision and recall. It’s particularly useful in scenarios where we want to balance the trade-off between false positives and false negatives. In our case, it provides a comprehensive measure of the model’s performance.</li></ul><p>To assess our models comprehensively, we performed a 5-fold cross-validation to ensure their robustness. This technique helped us gauge how well our models generalize to unseen data, which is vital in practical applications.</p><h3>Results</h3><h4>Model Performance</h4><p>Here’s a summary of the performance of these models on the testing set.</p><p><strong>Linear Support Vector Classifier:</strong></p><p>Highest accuracy achieved with: ‘Unigram + Bigram’ — 68%</p><p>Lowest accuracy achieved with: ‘Bigram’ — 50%</p><p><strong>Logistic Regression</strong></p><p>Highest accuracy achieved with: ‘Unigram’ &amp; ‘Unigram + Trigram’ — 74%</p><p>Lowest accuracy achieved with: ‘Trigram’ — 48%</p><p><strong>Decision Tree</strong></p><p>Highest accuracy achieved with: ‘Unigram + Bigram’ — 62%</p><p>Lowest accuracy achieved with: ‘Unigram + Bigram + POS’ — 47%</p><p><strong>Random Forest</strong></p><p>Highest accuracy achieved with: ‘Unigram’– 62%</p><p>Lowest accuracy achieved with: ‘Unigram + Trigram + POS’ — 39%</p><p><strong>Multilayer Perceptron (MLP) Artificial Neural Network</strong></p><p>Highest accuracy achieved with: ‘Unigram + Bigram’– 61%</p><p>Lowest accuracy achieved with: ‘Trigram’– 38%</p><h3>Model Comparison</h3><p>Based on the above results, we can observe that:</p><ul><li>Logistic Regression achieved the highest accuracy among all models for Unigram features, scoring 74%.</li><li>Models with a combination of Unigram and Bigram features, as well as the addition of POS tagging, exhibited improved performance.</li><li>Decision Tree and Random Forest models achieved competitive accuracy but demonstrated high sensitivity to n-gram settings.</li></ul><h3>Discussion</h3><p>Our project encountered several challenges and can consider some areas for improvements</p><p>More Diverse Dataset and improving the Data Quality:</p><p>Expanding the dataset with a wider variety of songs and genres can improve model generalization. The quality of mood classification depends on the accuracy of mood annotations in the dataset. Inconsistent or subjective annotations could lead to model inaccuracies.</p><p>Feature Engineering and Model Ensembling:</p><p>The choice of n-gram settings and the inclusion of POS tagging affects model performance. Finding the optimal combination requires experimentation. We can combine multiple models for improved accuracy through model ensembling techniques.</p><h3>Conclusion</h3><p>Our project explored various machine learning models and n-gram settings for music mood classification based on lyrics. We identified the strengths and weaknesses of different models and n-gram configurations.</p><p>Despite some limitations, our project demonstrates the potential for accurately predicting music mood based on lyrics. Further improvements can lead to more sophisticated and robust models for mood classification, enabling better user experiences in music recommendation and content curation platforms.</p><h3><strong>References</strong></h3><ul><li><a href="https://github.com/rasbt/musicmood">GitHub - rasbt/musicmood: A machine learning approach to classify songs by mood.</a></li><li><a href="https://www.kaggle.com/code/joecristian/brief-lyric-s-mood-identifier/report">Brief Lyric&#39;s mood identifier</a></li></ul><p>Shukla, Stuti, Pooja Khanna, and Krishna Kant Agrawal. “Review on Sentiment Analysis on Music”, International Conference on Infocom Technologies and Unmanned Systems, 2017<br><a href="https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8286111">https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=8286111.</a></p><p>Zhou, Yinan. “Music Emotion Recognition on Lyrics Using Natural Language Processing”, Music Technology Area Department of Music Research, Schulich School of Music, McGill University, Montreal, 2022. <a href="https://escholarship.mcgill.ca/downloads/1831cr00g?locale=en">https://escholarship.mcgill.ca/downloads/1831cr00g?locale=en.</a></p><p>Mihalcea, Rada, and Carlo Strapparava. “Lyrics, Music, and Emotions Using Natural Language Processing”, Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning,Association for Computational Linguistics, Korea, 2012 Pg: 590–599 <a href="https://aclanthology.org/D12-1054.pdf">https://aclanthology.org/D12-1054.pdf.</a></p><p>Yang, Dan &amp; Lee, Won-Sook, “Music Emotion Identification from Lyrics”, ISM.2009.123., Pg: 624–629, 2010 <a href="https://www.researchgate.net/publication/224094213_Music_Emotion_Identification_from_Lyrics">https://www.researchgate.net/publication/224094213_Music_Emotion_Identification_from_Lyrics.</a></p><p>Jamdar, Adit, Jessica Abraham, Karishma Khanna, and Rahul Dubey, “Emotion Analysis of Songs Based on Lyrical and Audio Features” ,International Journal of Artificial Intelligence &amp; Applications (IJAIA) 6, no. 3, 2015. <a href="https://arxiv.org/pdf/1506.05012.pdf">https://arxiv.org/pdf/1506.05012.pdf</a>.</p><p>Xue, H., Xue, L., Su, F. (2015). Multimodal Music Mood Classification by Fusion of Audio and Lyrics. In: He, X., Luo, S., Tao, D., Xu, C., Yang, J., Hasan, M.A. (eds) MultiMedia Modeling. MMM 2015. Lecture Notes in Computer Science, vol 8936. Springer, Cham. <a href="https://doi.org/10.1007/978-3-319-14442-9_3">https://doi.org/10.1007/978-3-319-14442-9_3</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=715490b4a1a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>