Keywords

1 Introduction

Recommender systems are systems that produce individualized recommendations as output or those that guide a user through a personalized process of interesting or useful objects in a large space of possible options [6]. Recently, more and more industrial recommender systems have been developed in a variety of domains such as books in Amazon.com, movies in MovieLens, and so on. Music recommendation also represents a fascinating area which requires a special focus. With the technological progress and the spread of smartphones, a large volume of online music and digital music channels are accessible to people, for streaming and downloading, like YouTube, Deezer and Spotify. Sourcetone categorizes its list of songs in three classes: mood, activity and health to help users to select songs they want to listen regarding their emotional state, current activity, and health state. In the same context, Last.fm makes use of the user’s location (respectively time) to offer him the top songs in his country (respectively upcoming events). These recommender systems have gone beyond the idea that considers the user’s musical preferences as a fixed recommendation parameter and assumed that these preferences change dynamically according to his/her context. We currently know that recommender systems become more powerful as far as they integrate contextual information [3]. However, the factors that can be used, in each application domain, are not well identified. One of the main issues that have to be solved before the design of a context-aware recommender system is the estimation of the relevance of contextual information before collecting data from mobile environment, in order to minimize real data acquisition cost and enhance the recommendations quality [1, 4]. Roughly speaking, it is necessary to study the dependencies between the user’s musical preferences in various scenarios to adapt the recommended music to his/her context and understand how can the users’s ratings change as far as his/her surrounding situation is shifted. To do so, we have collected explicit ratings from a population in various perceived contextual situations. The main objective of this paper is the definition of a context model for music context-aware recommender systems. Our methodology consists of: (i) selecting the music genres to represent users’ musical preferences; (ii) identifying the contextual dimensions used to generate the context model; and (iii) collecting users’ explicit ratings towards the selected music genres, in various perceived context situations, to define a multi-dimensional context model based on a priority order between the contextual dimensions. The remainder of the paper is organized as follows. We firstly detail the methodology that we have adapted to acquire the data describing the dependency between musical preferences and context dimensions in Sect. 2. In Sect. 3, we present the Multi Linear Regression (MLR) background. Next, in Sect. 4, we present our multi-dimensional contextual model by presenting our experimental evaluation and discuss our obtained results. Finally, we summarize our work and outline future directions in Sect. 5.

2 Methodology

The main objective of context-aware recommender systems is about adapting the recommended item to the user’s contextual situation. So, they start by the acquisition of item rating in various possible contextual situations. In this paper, we rely on users’ perceptions to express the role of context into their decisions. We have opted for the “perceived rating” rather than the “actual rating” because it is very difficult if not impossible to have all users in the actual context for rating. Thus, we proposed a user-based methodology aiming to assess the relationship between contextual factors and musical genres through two questions: (i) can a contextual factor influence users’ judgment; and (ii) how can they rate an item in a particular perceived contextual situation.

2.1 Contextual Factors

Context Concept. Given the complexity and the broadness of the context, many definitions of this concept have been proposed in the literature. According to WordNet Search 3.1, a context is the set of facts or circumstances that surround a situation or event. Dey suggests the following definition of a context: Context is any information that can be used to characterize the situation of an entity [7]. Other approaches have defined a context by examples and properties. The authors in [13] define an entity context through five categories: individuality, activity, location, time, and relations that the entity has set up with others. However, several works have defined a context based on the application area particularities. For example, when recommending a movie, [2] have explained the user’s context based on the following questions: when the movie was seen? where? and with whom?

Context Dimensions. In order to identify contextual factors that can influence mobile users’ listening preferences, we have surveyed former works on recommender systems and context-aware systems literature to extract the most used contextual factors (c.f., Table 1).

Table 1. Context’s dimensions

We have modeled the context as a set of contextual dimensions as shown by Eq. 1, where \(\mathcal {C}_{T}\) (respectively \(\mathcal {C}_{L}\), \(\mathcal {C}_{P}\), \(\mathcal {C}_{A}\), \(\mathcal {C}_{E}\), and \(\mathcal {C}_{S}\)) refers to the temporal (respectively location, physical, activity, emotional, and social) information.

$$\begin{aligned} { \mathcal {C}=(\mathcal {C}_{T},\mathcal {C}_{L},\mathcal {C}_{P},\mathcal {C}_{A},\mathcal {C}_{E},\mathcal {C}_{S}) }\end{aligned}$$
(1)

2.2 Music Preferences

Represent genres, artists or pieces of music liked by people. Thus, many ways can be employed to express people musical preferences using various levels of abstraction. For example, a person can express its preferences to a special music through a given song, e.g., “Simply Falling”, an artist, e.g., “Iyeoka”, a genre, e.g., “Jazz”, a sub-genre, e.g., “Soul Jazz”, or even some music attributes, e.g., “Vocal”, “Instrumental” or “Afro-American”. Thereby, studies have to identify the level of abstraction that will be used to categorize music. The simplest idea is to adopt the level that individuals naturally use to express their musical preferences. Music genres are considered as the optimal level of abstraction to assess people musical preferences. However, expressing musical preferences with genres assume that listeners have an acceptable knowledge about all music genres. This hypothesis makes raise a problem especially when we talk about different ages, i.e., old generation listeners are unfamiliar with new styles listened by young people. This limitation was discarded in our study as far as we have targeted a “young” population. We have also noted that there is no unique categorization of music genres. To solve this second problematic, we have chosen to start with iTunes storeFootnote 1 musical genres and validate this set through the focus group technique. Thus, we have retained 22 music genres (c.f., Table 2).

2.3 User-Based Study

In order to achieve our main goal and define an exhaustive contextual model for a music recommender system, we have been faced with the need to express the relationship between the user’s context and the type of music (s)he is listening to. For example, when we are sad do we prefer to listen to sad music or to happy songs to get out of our mood? Or do some of us prefer the first category while others prefer the second style? However, it is not easy to define and describe the above relationship between music preferences and the context in which they appear. Thus, recommender systems designers need a lot of human efforts to ensure a reliable ground truth. Hence, we have initiated a survey study which asks participants to express their musical needs.

Participants. When we talk about mobile computing, it gives us the picture of young adults quite keen to adopt new technologies. Indeed, this particular population behave differently with respect to technology compared to those over 40 years old who suffer from some technological cognitive shortcomings. Many studiesFootnote 2 \(^,\) Footnote 3 were based on young adults like students and have proved that this population produces generally positive outcomes. Thus, we have invited a total of 109 academics to respond to the online questionnaire designed to investigate the correlation between users’ current contexts and their musical preferences. These participants included 59 women (54.1%) and 50 man (45.9%). Their average age is ranged from 17 to 36 (age:17–19: 15; age:20–29: 86; age:30–36: 8) with different educational backgrounds (college student: 69; engineer: 21; Master student: 6; Ph.D. student: 13).

Procedure. Online surveys represent an efficient and low cost way to collect data rapidly especially as we have addressed a population that have good computer skills and can easily access to Internet. Then, we have chosen the online survey and developed an online questionnaireFootnote 4. In order to evaluate the questionnaire quality, we have considered two criteria during its design, i.e., validity and reliability. We have shared our questionnaire via an online research group. Hence, to allow the interviewees to expresses their degrees of agreement or disagreement versus a given question, we have used the Likert Scale. This latter has the advantage that it do not expect a yes/no response, but enables people to precise their degree of opinion, even when they have no opinion at all, in order to collect quantitative and subjective data.

3 Problem Representation: Multi Linear Regression

Let us consider a vector of contextual information \(\mathcal {C}=(\mathcal {C}_{1},\mathcal {C}_{2},\ldots ,\mathcal {C}_{n})\) describing the user’s environment, e.g., profile, task, etc. The objective of the context modeling problem is to represent these information as context dimensions and define an order of priority between them regarding the application field. Indeed, former works have combined many contextual dimensions into their recommender systems definition independently of users’ judgment over these dimensions [12]. An interesting idea is to solicit the users’ contribution to define the relation between their judgment of relevance and these dimensions through a multi-dimensional model. Usually, the problem of MLR [8] is used to express relationships between multiple criteria. It has been proved that MLR is very powerful when it comes to extrapolate or to generalize beyond the range of an experimental values, even with a relatively small data set. In this step, our objective is to define the relationship between musical genres and contextual factors. Let us consider the following components:

  • \(\mathcal {C}=(\mathcal {C}_{1},\mathcal {C}_{2},\ldots ,\mathcal {C}_{n})\) is a multi-dimensional vector of contextual dimension \(\mathcal {C}_{i}\), where \(\mathcal {C}_{i}\) is the \(i^{th}\) dimension of the context \(\mathcal {C}\); \(i=1,\ldots ,n\); and n is the number of linear terms. In this paper, we have used 6 linear terms to describe the user’s context as \(\mathcal {C}=(\mathcal {C}_{T},\mathcal {C}_{L},\mathcal {C}_{P},\mathcal {C}_{A},\mathcal {C}_{E},\mathcal {C}_{S})\).

  • \(\mathcal {G}=(\mathcal {G}_{1},\mathcal {G}_{2},\ldots ,\mathcal {G}_{m})\) is the set of musical genres, where m is the number of musical genres. In our case, \(\mathcal {G}=(Blues,Children's\_ music,\ldots ,Easy\_Listening)\).

  • \(Coef_{i,j}\) is the regression coefficient to be computed representing the importance of the context dimension \(\mathcal {C}_{i}\) regarding the musical genre \(\mathcal {G}_{j}\); \(i=1,\ldots ,n\) and \(j=1,\ldots ,m\).

  • \(\mathcal {P}_{Gj}\) is the user’s preference of the genre \(\mathcal {G}_{j}\); \(j=1,\ldots ,m\) and \(\mathcal {P}_{Gj} \in [1,5]\).

  • p is the number of experimental observations, i.e., 109 participants.

The regression problem is presented through Eq. 2 and allows to estimate the parameters \(Coef_{i,j}\) by exploiting the totality of the p experimental observations.

$$\begin{aligned} { \left\{ \begin{array}{l} \mathcal {P}_{G1} = Coef_{1,1} \mathcal {C}_{1}+Coef_{2,1} \mathcal {C}_{2}+\ldots +Coef_{n,1} \mathcal {C}_{n}\\ \mathcal {P}_{G2} = Coef_{1,2} \mathcal {C}_{1}+Coef_{2,2} \mathcal {C}_{2}+\ldots +Coef_{n,2} \mathcal {C}_{n}\\ \ldots \\ \mathcal {P}_{Gm} = Coef_{1,m} \mathcal {C}_{1}+Coef_{2,m} \mathcal {C}_{2}+\ldots +Coef_{n,m} \mathcal {C}_{n}\\ \end{array} \right. } \end{aligned}$$
(2)

More specifically, we have defined the relationship between the preference of a musical genre \(\mathcal {P}_{Gj}\) and the contextual dimension \(\mathcal {C}_{i}\) through Eq. 3.

$$\begin{aligned} { \mathcal {P}_{Gj}= Coef_{T} \mathcal {C}_{T} + Coef_{L} \mathcal {C}_{L} + Coef_{P} \mathcal {C}_{P} + Coef_{A} \mathcal {C}_{A} + Coef_{E} \mathcal {C}_{E} + Coef_{S} \mathcal {C}_{S} } \end{aligned}$$
(3)

where \(\mathcal {P}_{Gj}\) is the participant’s preference of the \(j^{th}\) musical genre \(\mathcal {G}_{j}\) and \(\mathcal {C}_{i}\) is a contextual dimension where i \(\in \) {“Time”, “Location”, “Physical”, “Activity”, “Emotion”, “Social”}. Our objective is to compute the optimal values of \(Coef_{T}\), \(Coef_{L}\), \(Coef_{P}\), \(Coef_{A}\), \(Coef_{E}\), and \(Coef_{S}\), that will serve to attribute weights for each contextual dimension while defining the context representation and minimize the impact of experimental errors. The mathematical representation of the MLR problem is expressed through Eq. 4.

$$\begin{aligned} { MLR_{\mathcal {G}}=\sum _{j=1}^{p=109}(y_{j} ~~ -\sum _{i=1}^{n=6}Coef_{i} ~~ x_{i,j})^{2} } \end{aligned}$$
(4)

where \(\mathcal {G}\) stands for the 22 musical genres; p is the number of data points (i.e., 109 participants); n is the number of linear terms (i.e., 6 contextual dimensions); \(y_{j}\) is the \(j^{th}\) dependant variable value; \(x_{i,j}\) represents the \(j^{th}\) measured independent variable value for the \(i^{th}\) variable; and \(Coef_{i}\) is the regression coefficient. We have formulated the regression problem as a Least Squares minimization problem (c.f., Eq. 5) that aims to compute the minimum values of \(Coef_{T}\), \(Coef_{L}\), \(Coef_{P}\), \(Coef_{A}\), \(Coef_{E}\), and \(Coef_{S}\), with respect to all the coefficients.

$$\begin{aligned} { \sum _{j=1}^{p=109} x_{k,j} y_{j}=\sum _{i=1}^{n=6} C_{i}\sum _{j=1}^{p=109} x_{i,j}x_{k,j}; ~~ k=1,\ldots ,n } \end{aligned}$$
(5)

where \(y_{j}\) stands for the \(j^{th}\) dependant variable value; \(x_{i,j}\) represents the \(j^{th}\) measured independent variable value for the \(i^{th}\) variable.

4 Results and Discussion

Understanding mobile users’ musical needs is of a paramount importance task to improve the design of mobile music recommender systems. In this paper, individual music preferences are expressed by participants via the online questionnaire. More precisely, for each contextual dimension, the participant is asked to evaluate the list of music genres using a Likert preference scale, i.e., No value = “I do not know or I do not want to say”, 1 = “I do not like very much”, 2 = “I like a little”, 3 = “I like”, 4 = “I often like”, and 5 = “I really like”. We have analyzed the participants’ responses to unveil their experiences with music and concretize the effect of contextual situations on the type of listened music.

4.1 Contextual Factors Influence

In order to identify the influence of contextual factors on people’s preferred musical genres, we have asked them to express their opinions through Likert scale. Our objective is to evaluate whether a given contextual dimension has a positive influence, a negative one or have no influence on participants’ judgment of music genres (c.f., Eq. 6). Hence, we have computed the difference between the participants’ judgment to a musical genre, in a perceived contextual situation, denoted \(pref^{+}\), and their judgment without taking any contextual factor into account denoted \(pref^{-}\), to determine the type of the influence denoted I.

$$\begin{aligned} { I = \left\{ \begin{array}{ll} positive ~influnce &{} ~~if ~pref^{+}-pref^{-} > 0;\\ negative ~influence &{} ~~if ~pref^{+}-pref^{-} < 0;\\ no ~influence &{} ~~otherwise.\end{array} \right. } \end{aligned}$$
(6)
Table 2. Normalized influence of contextual factors on participants’ preferences
Table 3. Normalized relevance judgment of contextual factors

In Table 2, we classify for each musical genre, the most influential contextual factor \(\mathcal {C}_{inf+}\) (respectively \(\mathcal {C}_{inf-}\)) that have influenced positively (respectively negatively) participants’ preferences, and its corresponding normalized degree of influence. These degrees of influence are computed using the arithmetic mean that represent the sum of the degrees related to all participants (c.f., Eq. 6) divided by the number of participants. The computed values were finally normalized within the unit interval using the Min-Max Feature scaling normalization. Table 2 screens out that the emotion dimension is the most influential contextual factor on people preferred genres. We have found that emotions have increased the preference of participants’ and produced a positive influence to 19 musical genres. It is also worth to mention that people are likely to listen to religious music when they are in a sad mood, i.e., their preferences to religious music have increased by 0.573. However, they prefer listening to rock music over anger situation with an average growth of 0.484. For the remainder of music genres, “joy” was the first influential condition having enhanced users’ preferences, i.e., this contextual condition have increased participants’ judgement about 17 musical genres. We also have noticed that a variety of social encounters can differently influence people musical choices. Indeed, people tend to listen to Children’s music while surrounded by kids with a normalized average value of 0.511. In the case of relaxation and rest situations, participants are keen to listen to Classical and New Age music with the respective improved values 0.646 and 0.622. However, many other contextual dimensions would negatively influence participants’ listened music. Location followed by weather conditions are the most influential factors that have decreased participants’ judgment to music genres. In fact, participants have mentioned that some types of locations may badly affect their judgments to 50% of music genres. For instance, in shopping places, people avoid listening to Children’s music, Dance, and Rock music with the respective normalized lowered values 0.383, 0.322, and 0.343. Recreation places have also decreased participants preferences to Soundtracks music (normalized average value decreased with 0.312). Entertainment places also play a negative role in people listening to some music genres, i.e., New age (normalized average value decreased with 0.382) and Religious music (normalized average value decreased with 0.278). Although many musical genres represent a good motivation to accomplish tasks and activities, we have found that other genres are not preferred while performing some activities. For example, people judgment have decreased with 0.3 to classical music while playing sport activities and to Hip Hop/Rap music while eating. In 31.82% of cases, weather conditions have played a remarkable negative influence in the choice of users to musical genres. In other situations, the temporal context has played a negative influence in participant’s preferred music. In the morning, people dislike electronic music, i.e., their judgment have decreased by 0.241. Sometimes, the same contextual dimension can have both positive and negative influence. For example, in the case of Classical music, activities were the most influential contextual factors, i.e., relaxation tends to improve the participants’ preferences with 0.646. However, sports activities have decreased their judgments to Classical music with 0.3. We discovered that as far as they are looking for something to listen to, participants have no specific idea about the music track or even the genre of music to choose. However, they have a particular priority scale, e.g., they want to have fun, to be entertaining, to relax, etc., that seems absolutely subjective. We noticed that these priorities are context dependent, such as time, past events, mood, people around or habits, and are expressed identically in the same situations, e.g., after a workday people are usually searching for soft music to relax when they are alone or for emotional music whenever they are with their companions.

4.2 Contextual Factors Relevance

In order to unveil the underlying relationship between each musical genre G and the different contextual dimensions, we have used the MLR technique [8].

The normalized results of the application of this measure are detailed in Table 3. For each musical genre, it lists the contextual factors and their importance on the variation of participant preferences. For example, in the case of Jazz music, we have found that the six contextual dimensions are sorted, using the importance order (\(\succ \)), with respect to their computed degrees of importance as: \(C_{E} \succ C_{A} \succ C_{S} \succ C_{L} \succ C_{T} \succ C_{P}\). In this case, the emotional context has the most important influence (i.e., 0.645), followed by the activity-based context (i.e., 0.225). However, the physical context came in the last position (i.e., 0.020). The general relevance order of different contextual dimensions is made by combining their relevance, regarding all musical genres, and is defined as: \(\mathcal {C}_{E} \succ \mathcal {C}_{L} \succ \mathcal {C}_{A} \succ \mathcal {C}_{T} \succ \mathcal {C}_{S} \succ \mathcal {C}_{P}\). The generalization of our results, detailed in Table 3, leads us to propose a multi-dimensional representation of the context without the specification of the musical genre (c.f., Eq. 7).

$$\begin{aligned} { \mathcal {C}= 0.123*\mathcal {C}_{T} + 0.228*\mathcal {C}_{L} + 0.071*\mathcal {C}_{P} + 0.134*\mathcal {C}_{A} + 0.323*\mathcal {C}_{E} + 0.121*\mathcal {C}_{S}} \end{aligned}$$
(7)

5 Conclusion and Perspectives

In summary, most of the approaches that integrate contextual information in their music recommendation process are data-driven. Roughly speaking, they use contextual data without understanding their relation with music. In this paper, we introduced a knowledge-driven approach for a subjective evaluation to define a new context model for music recommender systems based on users’ perceptions that express the role of context into their judgments. As a result, our study gives a sharp interest to the definition of the relationship between musical needs and contextual information that motivate these needs. The collected data can be used to generate a training model for rating prediction that associates music genres to contextual situations. In addition, the proposed model should be of great assistance to deal with the cold start problem, which occurs when a new user is registered to the system.