Can we classify a user’s music preference (low energy vs medium vs high energy) by analyzing the musical structure of the first two songs they play? and recommend by analysing their mood?
Step 1: Extract Core Audio Features
For each song:
-
BPM (tempo)
-
Energy score (0–1)
-
Loudness (normalized)
-
Beat strength
Step 2: Compute Weighted Intensity Score
Intensity Score per song:
Intensity =
0.35 × BPM_norm
-
0.35 × Energy
-
0.20 × Loudness_norm
-
0.10 × Beat_strength
Step 3: Early Preference Index (EPI)
If first two songs are S1 and S2:
EPI = (Intensity_S1 + Intensity_S2) / 2
Classify:
-
0.0–0.33 → Low Energy
-
0.34–0.66 → Medium Energy
-
0.67–1.0 → High Energy
Step 4: Recommendation Trigger
Instead of waiting for 20+ interactions:
Immediately:
-
Adjust homepage layout
-
Adjust playlist ranking
-
Modify autoplay direction
