A parameter-free KNN for rating prediction

https://doi.org/10.1016/j.datak.2022.102095Get rights and content

Highlights

  • Parameter-free KNN for rating prediction.

  • Optimization of the KNN algorithm by the choice of neighbors.

  • Dynamic selection of an optimal number of neighbors.

Abstract

Among the most popular collaborative filtering algorithms are methods based on the K nearest neighbors (KNN). In their basic operation, KNN methods consider a fixed number of neighbors to make recommendations. However, it is not easy to choose an appropriate number of neighbors. Thus, it is generally fixed by calibration to avoid inappropriate values which would negatively affect the accuracy of the recommendations.

In the literature, some authors have addressed the problem of dynamically finding an appropriate number of neighbors. But they use additional parameters which limit their proposals because these parameters also require calibration. In this paper, we propose a parameter-free KNN method for rating prediction. It is able to dynamically select an appropriate number of neighbors to use. The experiments that we did on four publicly available datasets demonstrate the efficiency of our proposal. It rivals those of the state of the art in their best configurations.

Introduction

The purpose of recommender systems is to predict users’ preferences over a wide range of items, and then offer them the items most likely to interest them. Since users are often overwhelmed by the huge amount of items provided by electronic retailers, recommendation is a salient feature for all types of e-commerce [1], [2]. That is why recommender systems attract a lot of attention due to their great commercial value [3], [4], [5], [6].

Collaborative filtering is a widely used category of recommender systems. It is based on the analysis of existing relationships between users and items to identify centers of interest concerning users [7], [8], [9], [10]. Based on these identifications, recommendations are made. Among the most popular collaborative filtering algorithms are the ones based on the K nearest neighbors (KNN) method. They automate the common principle of word-of-mouth where one relies on the opinions of people sharing the same interests to assess the value of an item. These algorithms are recognized as easy to use with explainable recommendations, in addition to be efficient and stable [8], [11].

In the literature, KNN methods are well studied and many approaches have been proposed to predict the rating that a user could have on an item [9], [12], [13]. The idea behind these methods is that the rating of a user u on an item i is probably close to the one of another user v, if both users u and v have similar ratings on other items.

In their basic functioning, the number K of neighbors to consider is the only used parameter. However, finding an optimal value of the parameter K remains a challenge. An inappropriate value of K can negatively affect the quality of the recommendations. Therefore, the parameter K is usually set to a tuned value by Grid Search.

Some authors have already addressed the problem of dynamically finding an appropriate value of K in order to optimize the quality of recommendations [14], [15], [16]. In their approaches, they introduce additional parameters which make it possible to determine an appropriate value of K but must be also calibrated in turn.

In this paper, we propose a parameter-free KNN method for rating prediction that we named freeKNN. It is able to dynamically select an appropriate number of neighbors to take into account depending on the user and the item to be rated. The experiments that we conducted on four public datasets demonstrate its effectiveness.

The remainder of this paper is organized as follows. In Section 2, we present related works on dynamic search for an appropriate value of K in order to optimize the quality of recommendations. In Section 3, we detail the freeKNN method which does not use any parameter to make predictions. We explain how it dynamically seeks an appropriate number of neighbors to consider. Section 4 presents the results of our evaluation which demonstrate the effectiveness of freeKNN. Finally we conclude this paper in Section 5.

Section snippets

Related works

Recommender systems (RS) seek to suggest high-interest items to users, whether in terms of predicting the rating that the user would give to an item or estimating the likelihood of interaction1 between a user and an item.

In this context, the task of recommendation can be reduced to finding the N items for which a user u would give the highest ratings and recommending them to him. Formally, the task can be defined as follows: Top(u,N)=argmaxiINrˆuiwhere I is the set of

freeKNN

We named our method freeKNN. It can predict the rating that a user would give to an item without setting a number of neighbors to be considered beforehand.

The operation of the freeKNN method is based on the notion of Top-neighbors which we define as the smallest sublist of neighbors of Nui whose global opinion is representative from that of all the neighbors.

For the sake of simplicity, we present in Section 3.1 some important definitions to understand how freeKNN works before explaining its

Experiment

For the validation of our method, we compared it to those presented in our state of the art in Section 2. In addition to these methods, we have also included the results of the standard KNN method with the parameter K optimized on the best number of neighbors determined from an exhaustive search.

Conclusion

In the context of collaborative filtering and rating prediction, we addressed the problem of improving KNN methods. We focused on optimizing the number of neighbors to take into account while recommending an item for a user. We have proposed a method for dynamic selection of an appropriate number of neighbors.

Our method does not require any parameters unlike those of related works. It estimates, for a given user and item, the importance of the possible rating values that have been assigned in

Declaration of Competing Interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Junior Fopa Medjeu holds a master’s degree in computer science specializing in Business Intelligence. His research theme as part of his master’s internship focused on recommender systems.

He did his humanities in Cameroon and benefited from an intra-African mobility grant which brought him to Cheikh Anta Diop University in Dakar, Senegal.

References (29)

  • KaleliC.

    An entropy-based neighbor selection approach for collaborative filtering

    Knowl.-Based Syst.

    (2014)
  • ZhangS. et al.

    A novel kNN algorithm with data-driven k parameter computation

    Pattern Recognit. Lett.

    (2018)
  • SchaferJ.B. et al.

    Recommender systems in e-commerce

  • BellR.M. et al.

    The million dollar programming prize

    IEEE Spectr.

    (2009)
  • DiasM.B. et al.

    The value of personalised recommender systems to e-business: a case study

  • JannachD. et al.

    A case study on the effectiveness of recommendations in the mobile internet

  • LindenG. et al.

    Amazon.com recommendations: item-to-item collaborative filtering

    IEEE Internet Comput.

    (2003)
  • FlederD.M. et al.

    Recommender systems and their impact on sales diversity

  • DouY. et al.

    A survey of collaborative filtering algorithms for social recommender systems

  • SuX. et al.

    A survey of collaborative filtering techniques

    Adv. in Artif. Intell.

    (2009)
  • KorenY. et al.

    Matrix factorization techniques for recommender systems

    Computer

    (2009)
  • A. Paterek, Improving regularized singular value decomposition for collaborative filtering, in: Proc. KDD Cup Workshop...
  • KoenigsteinN. et al.

    Yahoo! music recommendations: modeling music ratings with temporal dynamics and item taxonomy

  • Cited by (10)

    View all citing articles on Scopus

    Junior Fopa Medjeu holds a master’s degree in computer science specializing in Business Intelligence. His research theme as part of his master’s internship focused on recommender systems.

    He did his humanities in Cameroon and benefited from an intra-African mobility grant which brought him to Cheikh Anta Diop University in Dakar, Senegal.

    Modou Gueye is an Assistant Professor at Cheikh Anta Diop University. He holds a Ph.D. degree from Telecom Paris, a leading French engineering school specialized in computer science.

    He mainly works in designing scalable, but accurate too, recommender systems.

    Samba Ndiaye is a Professor at Cheikh Anta Diop University. He supervised many doctorates on diverse fields of Data mining.

    His research interests are in large scale data management and mining, recommender systems and web information extraction.

    Hubert Naacke is an Assistant Professor at Pierre and Marie Curi University, also known as Paris 6, a public research university in Paris, France.

    He is the author and co-author of several publications in international conferences and journals, national conferences, and book chapters. A part of his research interests are in recommender systems.

    View full text