• No se han encontrado resultados

Capítulo IV. Estrategias para el cierre de brechas

4.3. Alineación de las estrategias a los principios de la norma

There are two basic entities that drive a recommender system: userswho use the recommender system to provide opinions as well as receive recommendations and items that are rated by users. The inputs to a recommender system are usually arithmetic rating values, which express the users opinions of items and follow a specified numerical scale (example: 1: bad to 5: ex- cellent). The outputs of a recommender system can be either predictions or recommendations. Let U = u1, u2, ..., un be the set of all n users in a recommender system and I =i1, i2, ..., im

be the set of items where m is the total number of items. Let R be a rating matrix where

rij is a rating provided by user ui on item ij. Usually the rating matrix is sparse because of

missing values as it is not possible to rate all items nominated by all users in a system. The missing rating is denoted by rij = 0. Hence the primary goal of a recommender system is to

Underlying Recommendation Algorithms 38

on different scenarios the types of recommendations for users may vary. In this thesis we have used weighted sum and adjusted weighted sum approach to predict the missing ratings in item based recommendation system.

2.2.1 Item based Recommendation

2.2.1.1 Similarity Calculation

To generate recommendations, one of the key steps is to calculate similarities/correlations among the item pairs. Cosine similarity is one of the commonly adopted similarity measures to determine the nearest neighbour in recommendation generation. Recalling the notations mentioned previously, the similarity between two items is defined as

s(ij, ik) = Pn i=1ri,jri,k q r21,j+· · ·+r2n,jqr12,k+· · ·+rn,k2 (2.10)

where, ij and ik represent two individual items. ri,j andri,k represent the ratings provided by

the user ui on those two items andnrepresents the total number of users.

2.2.1.2 Recommendation Generation Weighted Sum based Prediction

In weighted sum approach based recommendation first, the similarity between items are cal- culated. Then based on the similarity weight and other available ratings the missing ratings are predicted as follows:

Pi,k = Pm j=1ri,j·s(ij, ik) Pm j=1s(ij, ik) (2.11) where, Pi,k denotes the rating prediction for user ui. k={1,2, ..., m} is the number of items

that the target user has requested for the recommendation. ri,j and s(ij, ik) denote the rating

Underlying Recommendation Algorithms 39

Adjusted Weighted Sum based Prediction

Given similarities among the items, the adjusted weighted sum based rating prediction of user

ui for itemik can be represented by

Pi,k =

Rk·Pmj=1s(ik, ij) +Pmj=1(ri,j−Rj)·s(ik, ij)

Pm

j=1s(ik, ij))

(2.12) wherePi,k denotes the prediction for userui on item ik. ri,j and s(ik, ij) represent the rating

provided on itemij by userui and the similarity between itemsik and ij respectively. Rk and

Rj represent the average ratings of items ik and ij respectively. Note that the average rating

of a particular item is computed as dividing the total rating by the total number of users who have actually rated that item.

2.2.2 User based Recommendation

The main difference between user and item based recommendations in terms of weighted sum and adjusted weighted sum based approached is that, the technique finds the similarity between users where in item based prediction, the technique finds the similarity between items. So the prediction formula for user based recommendation (weighted sum) can be written as,

Pi,j = P 1≤k≤n,k6=irk,j·s(ui, uk) P 1≤k≤n,k6=is(ui, uk) (2.13)

where s(ui, uk) denotes the similarity between users ui and uk and rk,j denotes the ratings of

user uk with k 6= i. The similarity function s(ui, uk) between users ui and uk using Cosine

distance can be represented as follows:

s(ui, uk) = Pm j=1ri,jrk,j q r2 i,1+· · ·+ri,m2 q r2 k,1+· · ·+r2k,m = m X j=1 Ri,j·Rk,j (2.14)

whereui6=uk,Ri,j = q ri,j r2 i,1+···+ri,m2 , and Rk,j = q rk,j r2 k,1+···+r2k,m .

Related Work 40

2.2.3 Weighted Slope One Predictor

Letu= 1,2, ..., nbe the set of users, and letj= 1,2, ..., mbe the set of items in a recommender system, where n and m denote the total number of users and items, respectively. A rating provided by useruon itemjdenoted asru,j. LetPu,j the prediction for target useru, on item

j and Ru the set of items which are actually rated by the target user. The weighted slope one

predictor for recommendation generation can be presented as,

Pu,j = P

k∈Ru

P

k∈Rj,k(ru,j−ru,k) +|Rj,k| ·ru,k

P

k∈Ru|Rj,k|

(2.15) wherek∈Rj,k(ru,j−ru,k) denotes deviation between two itemsjandk(j6=k),|Rj,k|denotes

the cardinality or the total number of users who have co-rated both itemsj and k.