As music obviously induces various emotional states, one pertinent research question is why some folks enjoy listening to sad music? Well, although sad music seems to really make some listeners sad, emotional states when listening to sad music are oftentimes more complex and may also involve positive emotions such as nostalgia and peacefulness.
Clustering is an important data mining tool for statistics and machine learning. It belongs to the class of unsupervised learning algorithms and its main function is to group together objects that share similar features into clusters. Here I present a short demonstration of how a clustering algorithm can be applied in R and what it may be used for. To this end, I present a real use case from a research project on musical taste I conducted at the Max Planck Institute for Empirical Aesthetics.