Skip to content
LAH.
Back

📊 Data Analysis

Emotion-Based Music Recommender

Emotion-Based Music Recommendation System

Swipe to see more images

Image 1 of 6

Emotion-Based Music Recommender analysis chart 1

Description

An explainable AI-based music recommendation system using attention-based emotion preference learning. The system detects user emotions from text input, applies TF-IDF + Logistic Regression for sentiment classification, uses attention-weighted feature analysis, and provides content-based song recommendations with full XAI transparency.

Development Steps

  1. Data Preprocessing

    Standardizing columns, handling missing values, and preparing music sentiment dataset for analysis.

  2. Exploratory Data Analysis

    Visualizing sentiment distribution, genre distribution, mood proportions, tempo categories, and sentiment-genre correlations.

  3. Emotion Detection

    Applying TF-IDF vectorization and Logistic Regression to classify user text input into emotion categories (Happy, Sad, Motivated, Relaxed).

  4. Attention-Based Preference Learning

    Computing attention weights per feature per sentiment — features with lower variance (more consistent) receive higher attention scores.

  5. Content-Based Filtering

    Building weighted cosine similarity using attention weights to find songs most relevant to the detected emotion profile.

  6. Explainable AI & Visualization

    Generating per-song feature contribution breakdowns, attention word analysis, and XAI heatmaps explaining why each song is recommended.

  7. Evaluation

    Evaluating system performance using Precision@K, Recall@K, Hit Rate, MAP, and NDCG metrics at K=3, K=5, and K=7.