• Ei tuloksia

3. Method

3.5 User-timbre Preference

User-timbre acceptance probabilities are used as parameters to estimate the prob-ability of a user to accept a music piece. An estimated user-timbre acceptance probability is called user-timbre preference for simplicity.

3.5.1 Parameter Estimation

The goal of this step is to estimate user-timbre preference with empirical probabili-ties. The empirical probability or relative frequency of a user to like a timbre is the ratio of the sum of timbre weights in music pieces that the user accepted to the sum of timbre weights in music pieces that user has listened. The estimated statistical parameter of userulikes timbret is denoted asqu,t. This parameter is estimated as:

s+u,t = X

{m|ru,m=1}

wm,t (3.2)

su,t = X

{m|ru,m6=null}

wm,t (3.3)

qu,t = s+u,t

su,t . (3.4)

Here s+ and s are two sums. s+u,t is the sum of timbre weights for every piece of music that useruaccepted. su,t is the sum of timbre weights for every piece of music that there exists a binary rating on it from the user u. In another word, su,t is the sum of timbre weights for every piece of music that user u has listened.

Figure 4.6 shows an example with four users and four pieces of music. Music audios are modeled with three distributions of timbre. Let us take the preference of user 3 on timbre 2 as an example. User 3 has listened to three pieces of music.

Their binary rating values are shown r3,1 = 0, r3,2 = 0, r3,3 =null and r3,4 = 1 in the red frame in Figure 3.5. User 3 accepted only music 4 whose weight on timbre 2 is 0.1 so that the positive timbre sum iss+3,2 =w4,2 = 0.1. Along with positive rate on music 4, user 3 disliked music 1 and music 2 so that s3,2 =w1,2+w2,2 +w4,2 = 0.3 + 0.5 + 0.1 = 0.9. The estimated user-timbre preference of user 3 on timbre 2 is thereforeq3,2 =s+3,2/s3,2 = 0.1/0.9 = 0.111.

Figure 3.5: User-timbre preference estimated by binary ratings and timbre weights.

From the example above, we are going to derive the matrix form of parameter estimation. Rating matrix is defined so that each row corresponds to a piece of music and each column corresponds to a user. An element ru,m in the rating matrix is the

binary rating value (orrm,u=null when the rating is missing) for the corresponding useruand musicm. The rating matrix is denoted asR. Two matrices are generated from rating matrix: a positive rating matrix and an existing rating matrix. Positive rating matrix Rp is obtained by filling missing values of rating matrix with zeros.

Existing rating matrix Re is obtained by setting all existing value in rating matrix with one and fill missing values with zeros. Following this rule, Rp and Re that are derived from the rating matrix in above example is shown below. W stands for timbre weight matrix, where rows correspond to music pieces and columns respond to timbres. An element in the timbre weight matrix is the timbre weight valuewm,t.

Rp =

Given above three matrices, the user-timbre preference matrix Q is estimated through

Q= (RpTW)./(ReTW), (3.5) whereT stands for transpose and./means element-by-element division. Elements in the timbre preference matrix are the estimated user-timbre acceptance probability qu,t.

When a user listened to music pieces with only a narrow range of timbres, a problem is seen for user-timbre preference estimation. For example a user liked nine violin solos and disliked one violin solo without rating on any other type of music.

As a result, the timbre weight sum of other timbres would be very small random-like value so that the estimated timbre preference would be inaccurate. To address this problem, users are assumed to have universal musical experience with all types of timbre. The method is to make padding with average timbre weight to smooth the user-timbre acceptance probability estimation. Average timbre weightwM ,tis mean of timbre weight vectors of whole dataset of music as follows:

wM ,t = X

m∈M

wm,t/|M|, (3.6)

whereM is set of all music pieces in the system.

Another benefit to use the padding is to get different timbre preference values for those users who have only positive or only negative ratings. In practice, some users are more inclined to give positive ratings or vice versa. The extreme situation of inclined rating is that some users always like and never dislike, which makes all user-timbre preference estimated to 1, making the parameters non-sense. Padding

operations is done by

˜

s+u,t =s+u,t+αwM ,t (3.7)

˜

su,t =su,t+βwM ,t, (3.8)

where s˜means padded timbre weight sum. Two padding factors α and β are mul-tiplied to average timbre weight. The default user-timbre preference probability value when there is no evidence on a timbre is determined by α/β <1. The higher this ratio is, the less smooth comparison between high preferable and low preferable timbres.

3.5.2 Acceptance Probability Prediction

The conditional probability that a user accepts a music can be formed from a gen-erative model through the Bayes’ rule, with timbres as a hidden variables:

p(ru,m = 1) =X

t∈T

pm(t)p(ru,m = 1|t), (3.9) where p(ru,m = 1) stands for the probability of user u accepts music piece m. The probability that music m generates timbre t is pm(t). The probability that a user accepts a timbre is assumed to be always the same no matter what music the user listens to so that for the same u and t, p(ru,m = 1|t) is independent of m. Let us use rˆu,m to denote the estimated probability that user ulikes music m with a set of T timbres as hidden variables. The probability is estimated as

ˆ

ru,m =X

t∈T

wm,tqu,t, (3.10)

where pm(t) is estimated with the timbre weight wm,t discussed in Section 3.2 and the probability that a user likes a timbre is estimated with user-timbre preference qu,t discussed in Section 3.4.1. The matrix form of this process is as

Rˆ =QWT (3.11)

where Rˆ is the matrix of estimated probability rˆu,m. Q and W are user-timbre preference matrix and timbre weight matrix respectively.

Figure 3.6 continues the example used in Figure 3.5. It takes the user-preference matrix obtained and the timbre weight matrix used in Figure 3.5 as input to predict the probability of an acceptance.

User-timbre

Music 1 0.720 0.412 0.280 0.496

Music 2 0.298 0.273 0.409

Music 3 0.529 0.283 0.471 0.182

Music 4 0.553 0.418 0.447 0.321 User 3

Figure 3.6: Predicted probability of acceptance by user-timbre preference.