  Recommender systems serve a dual purpose for users: sifting out inappropriate
or mismatched information while accurately identifying items that align with
their preferences. Numerous recommendation algorithms are designed to provide
users with a personalized array of information tailored to their preferences.
Nevertheless, excessive personalization can confine users within a "filter
bubble". Consequently, achieving the right balance between accuracy and
diversity in recommendations is a pressing concern. To address this challenge,
exemplified by music recommendation, we introduce the Diversified Weighted
Hypergraph music Recommendation algorithm (DWHRec). In the DWHRec algorithm,
the initial connections between users and listened tracks are represented by a
weighted hypergraph. Simultaneously, associations between artists, albums and
tags with tracks are also appended to the hypergraph. To explore users' latent
preferences, a hypergraph-based random walk embedding method is applied to the
constructed hypergraph. In our investigation, accuracy is gauged by the
alignment between the user and the track, whereas the array of recommended
track types measures diversity. We rigorously compared DWHRec against seven
state-of-the-art recommendation algorithms using two real-world music datasets.
The experimental results validate DWHRec as a solution that adeptly harmonizes
accuracy and diversity, delivering a more enriched musical experience. Beyond
music recommendation, DWHRec can be extended to cater to other scenarios with
similar data structures.
