1 Introduction

Recommender Systems (RS) are software applications and approaches that make recommendations of relevant items that a user would find useful. These suggestions are related to a variety of topics like deciding to buy e-commerce items, what song to listen to next, what news articles to read etc. Users and items are the two basic terms that are often encountered in RS. Users are the customers or consumers while the items may be movies, hotels, or any real-world objects that are consumable by the users. RS typically specializes in a single sort of item like movies, as a result, its basic recommendation mechanism is to generate and deliver relevant recommendations for that specific sort of item [16]. Recommendation engines are built with the help of information about consumers and items. Recommendations are generally personal to the individual, various users or user groups will get different suggestions [18]. Non-personalized recommendations also exist. It is much easier to make suggestions based on their popularity. While these types of non-personalized suggestions may be relevant in some cases, they are not much explored in RS.

Necessity of RS [28] Here, we discussed the necessity of RS in the modern era from both the customer and industry point of view.

  • User point of view: In this information era, an abundance of data is available on the internet. It is almost impossible to manually choose an item among the numerous available items. We face these types of problems in various real-world scenarios like choosing a hotel, movie, etc. Recommender systems (RS) solve this problem. They suggest items to the user such that the recommended items are relevant and accurate enough to satisfy the user.

  • Business point of view: In some businesses, RS is crucial since it can produce a large amount of revenue or serve as a method to differentiate a company from its competitors.

Various approaches The two main approaches in which recommender systems recommend items are Content-based Filtering and Collaborative Filtering [30]. A hybrid approach is an ensemble model of the other two methods. In content-based filtering, information about a particular item or user decides the recommendations. In Collaborative Filtering, recommendations are based on the historical relationship among different users and items. Such interactions are generally captured as feedback from users either directly or indirectly. These are known as explicit and implicit feedback. Using this information, ratings are predicted for any given user and item. The main idea behind Collaborative Filtering is, that users will agree now if they agreed previously [1].

There are mainly two different approaches in which collaborative filtering is applied. It is memory-based and model-based. Memory-based techniques are simple compared to model-based techniques. Memory-based approaches are generally user-based and item-based. In a user-based technique, items are recommended to a user such that those items are highly liked by similar users (Fig. 1). In the same way, in an item-based approach, items are suggested such that those items receive similar feedback from the same user [29]. Model-based techniques employ Machine Learning (ML)and Deep-Learning (DL) methodologies to train the model. As a result, model-based techniques yield better results compared to memory-based techniques. Model-based methods are generally Matrix Factorization(MF) based methods, clustering techniques, and others.

Fig. 1
figure 1

Categorisation of recommender systems [32]

We consider only the movie recommendation system throughout this work. The application of recommender systems to movies became popular with the Netflix prize competition announcement in 2006Footnote 1. The winners of this competition used a latent factor model called Matrix Factorization. Rating to an item given by any user is predicted by using the latent factors of the user to that particular item. Euclidean Embedding is an alternative latent factor model that yields similar results as Matrix Factorization. In the Matrix Factorization technique [4], explicit ratings that are in the range of 1 to 5 are used to train the model. Desarkar et al. [2], the absolute ratings which are in the range of 1 to 5 are not used directly. Instead, they are converted into preference relations. This is because the preference relation-based collaborative filtering yields better results compared to that of absolute ratings as mentioned in [2]. In this work, we propose a latent factor technique EEPR for the recommender system in Collaborative Filtering Framework. Here, instead of using absolute ratings to train the model, preference relations are used to predict the rating. Here we try to validate the hypothesis, whether higher-order information like preference relations derived from the item ratings, improves the existing latent factor models. Euclidean distance is measured between any user and item rather than using the dot product. There are many open-source datasets available for building RS like MovieLense-100k, 1M, 10M, 25M, TripAdvisor, Netflix-1M, Yahoo Music etc. In this work we focus only on the movie RS dataset, detailed in Section 5.

The major challenge of the proposed methodology is extracting a dataset from one of the popular datasets due to hardware limitations. This is the reason, the majority of researchers are not working in collaborative filtering based on preference relation. eg. in our case, extracting dataset has taken 3 to 4 days. The major contribution of this paper is discussed below.

  • The training dataset is formulated by using preference relation.

  • Euclidean Embedding is applied to the formulated dataset.

  • We use two datasets and compare them with existing state-of-the-art.

  • We validate the hypothesis, that higher-order information like preference relations derived from the item ratings, improves the recommendation performance of existing latent factor models.

The structure of the rest of the paper is as follows: Literature, which is related to this paper discussed in Section 2. Section 3 explores the background work. Section 4 discusses the proposed methodology. Section 5 explains the experimental setup, evaluation strategy, and used dataset. Results and their analysis are given in Section 6. Conclusion and future work are given in Section 7.

2 Related work

2.1 Collaborative filtering approaches

The collaborative filtering (CF) approach is the most popular methodology that is often employed in the domain of recommendation systems. This method’s main goal is to predict the ratings from the already available ratings. CF is usually implemented using two methods. The first one is neighborhood-based methods which are also referred to as Memory-based techniques. The second one is model-based techniques. Neighborhood methods are called memory-based because they require a complete data set of ratings to predict the recommendations. User-based and item-based K-NN are well-known memory-based techniques, as discussed in [9, 17].

The user-based approach predicts ratings based on users who are most liked by the given user, while the item-based approach predicts ratings based on the most similar items to the given items. Many similarity metrics like cosine similarity (COS), Pearson correlation (PCC), constrained Pearson correlation (CPCC), sigmoid PCC, weighted PCC etc. are available in the literature. Hyung et al. [33] proposed a similarity technique named as PIP. They have addressed the cold start user problem. Later, Zheng et al. [35] improve the accuracy compared to PIP in terms of cold start. They have given the solution for the drawbacks of the memory-based similarity technique. The drawbacks of the similarity techniques are the low similarity between two similar users, and the high similarity between two unlike users, ignoring the proportion of common ratings of two users. Sreepada et al. [27] proposed a revisited tendency-based approach (RTCF) to address a new cold start user problem. They introduce a stable neighborhood with user and item tendencies. The authors in [6] treated the recommender system as a classification problem. They have used Naive Bayes Classifier (NBC) to provide the recommendations. NBC is a probabilistic model, where the posterior probability is computed using the prior and likelihood probabilities from the training data set. Explicit ratings provided by the users are considered as features. It is treated as a multi-class classification problem where each class corresponds to an integer value on a rating scale of 1 to 5. The maximum a posterior (MAP) rule is used to predict the class label. The results computed by this model are better compared to that of neighborhood techniques.Footnote 2.

Table 1 Literature survey for proposed methodology

On the other side, model-based methods learn the model parameters during the training phase with the help of a training data set that contains ratings (Table 1). Later, in the prediction phase, they predict ratings using the parameters that are learned during the training phase. Latent factor models are popular and these models belong to model-based approaches. One of the most successful strategies among latent factor models is matrix factorization (MF) [4]. The rating matrix, known as the user-item matrix is factorized into two matrices, namely the item-feature matrix and the user-feature matrix. The user rating to any item is predicted by the dot product of the user’s and an item’s feature vectors. There are many variations of MF like NMF(Non-Negative Matrix Factorization), and BNMF(Bayesian Non-Negative Matrix Factorization). A rating matrix is factored into two matrices, W and H, using NMF [13]. The values inside these matrices should be greater than zero always. Each user and item in BNMF [14] is associated with a vector of K components. The components of these vectors have probabilistic significance and allow for the identification of groups of users with similar tastes, along with the justification of the recommendations provided by this technique. Another variation of MF is proposed in [8]. DeepMF implements MF in a layered architecture. Besides MF, there are other latent factor models in the literature like Euclidean Embedding. It is an unsupervised learning model [12] used as dimensionality reduction. But most of the time it is used for visualization purposes [11]. It is similar to MF except for the fact that Euclidean distance is used in predicting rating instead of the inner product between the user and item features. The recommendations provided by the EE model are better compared to that of the MF model. This approach also allows for online implementation criteria like adding new users or objects to an existing model [3]. Euclidean Embedding techniques are widely explored with Deep Neural Networks [7].

Nicolas et al. [10], they discuss various types of ratings that are used in recommender systems and show that preference relations give better information than absolute ratings. Later on, Armelle et al. [15] proposes a collaborative model for predicting ratings and gives suggestions using it. The item’s position in the preference series of the similarly rated individual user is used to predict its significance. The items on the recommendation list are arranged in decreasing order of their expected utility. Recommendations are generated in the decreasing order of the items’ estimated utilities. Desarkar et al. [2], proposed matrix factorization with preference relations (MFPR) in the place of actual ratings. They extended this work in [5] such that the predicted ratings are in the range of 1 to 5.

2.2 Content-based approaches

Content-Based(CB) RS suggests things to the users depending on their previous ratings. To give relevant information to the user, a user profile with certain features of the items must be developed utilizing data mining and other information retrieval methods. In the content-based RS, the similarity of the items that the user is interested in is used to filter things. It either suggests or examines items depending on high-rated items that are comparable to the user’s preferences [21]. The problem with this system is that sometimes items are recommended in coincidence.

Pasquale et al. [22] proposed a Content-based RS that builds the profiles for users and items. It works in such a way that the performance gradually increases over time. Implicit feedback is used to implement and evaluate the model. Tewari et al. [23] developed a book RS by using multiple features like quality, book description, etc. They also used the collaboration of other users to recommend books. The model built is offline and has no performance issues. The major problem with this approach is cold start still exists. Nahtal et al. [26] introduced Meta Embedding Deep Collaborative Filtering (MEDCF) for rating prediction in the cold-start scenarios.

2.3 Application of recommender system(RS)

Recommendation System finds huge use in various domains. Some of the examples are discussed below.

  • TV program recommendation: Smart TV sets are growing fast. Nowadays, Authorised user is allowed to provide preference on TV. These preferences are used during the recommendation scenarios of TV. Tivo [36] permits authorized users to give preference using remote control. Suitable programs are efficiently recommended using CF. Hyeong et al. [37] gave a unique similarity method that applies raw moment based similarity. It is a memory-based CF to resolve the cold start problem and cost optimization. The software queveo.tv is originated by Barragáns-Martínez et al. [38], which combines the CB approach and item-based CF approach to address the cold start problem. Zimmerman et al. [39] made recommendations based on the implicit and explicit feedback from authorized users. It infers the approximate interest of the user. Govind Kumar Jha et al. [41] proposed a trustworthy approach for recommender systems in the scenario of movie communities. They have developed the model using a machine learning approach and introduced an inversion similarity procedure in order to obtain efficient recommendations.

3 Background

In this section, we discuss the baseline paper for the proposed one based on collaborative filtering namely Matrix Factorization, and Euclidean Embedding in a detailed manner. We also discuss the motivation behind using preference relations. In the later part of the section, the detailed formulation of preference relation with matrix factorization is discussed.

The models under discussion are optimization-based Machine Learning(ML) problems. So, here we explain the steps involved in solving any ML problem in RS.

  • Phase1: This phase is called data prepossessing. Here, we perform data cleaning and remove unwanted things from the data. We divide the entire dataset into training data and testing data.

  • Phase2: This phase is called model learning. The model is learned using the training data. The steps involved in this phase are explained with the help of Fig. 2.

  • Phase3: This phase is recommendation generation. In this phase, we generate the recommendations for the user by taking the input as user weights. We compute the score for all the items that are previously not rated by the user, and then items recommended to the user in the decreasing order of their scores.

  • Phase4: This phase is evaluation. In this phase, the model is evaluated using the test data. Various evaluation metrics like rmse, mae, precision, and recall are used.

3.1 Matrix factorization (MF) [2, 4]

It is one of the most commonly used latent factor models used in RS. The Netflix Prize Competition (2006) winners used this technique to improve the accuracy of the RS. There are many variations of MF that are being proposed in literature even today. This approach is even extended for group RS. We explain the process of MF in detail along with its advantages and limitations in this section. The diagrammatic representation of the MF process is given in Fig. 3.

Fig. 2
figure 2

Flowchart for learning the model using optimization-based machine learning approach

Fig. 3
figure 3

An overview of MF [19]

The primary aim of the Matrix Factorization problem is to factorize a rating matrix R into P and Q such that these two matrices can estimate all of R’s unknown values. R is a rating matrix that contains the explicit ratings that a user has provided for a particular item in the past. Generally, R is very sparse. P represents user features and Q represents item features. The inner product of P and Q gives the predicted ratings. Consider a scenario in which there are N items and M users in a d-dimensional space, then \(R \in \mathcal {\mathrm{I\!R}}^{MXN}, P \in \mathcal {\mathrm{I\!R}}^{MXd}\) and \(Q \in \mathcal {\mathrm{I\!R}}^{NXd}\). Now, R is factorized in a way such that it is approximately equal to PxQ. Each row of P corresponds to the user vector \(p_u\) and quantifies his/her satisfaction levels on the corresponding factors present in an item. Similarly, each row of Q corresponds to an item vector \(q_i\) and quantifies the presence of those factors in that item. The dot product of item and user vectors is used to measure the predicted rating for any item i by a given user u using (1).

$$\begin{aligned} \hat{r}_{ui} = q_i^T p_u \end{aligned}$$
(1)

The difference between the actual and predicted rating is used to measure the error function using (2)

$$\begin{aligned} \epsilon _{ui} = r_{ui} - q_i^T p_u \end{aligned}$$
(2)

The minimization expression is presented by (3).

$$\begin{aligned} {\min }_{q, p} \sum _{u_{,}i \in S} (r_{ui} - \hat{r}_{ui})^2 + \lambda (p_u^2 + q_i^2) \end{aligned}$$
(3)

where \( \lambda \) is regularization variable to avoid overfitting and S is training dataset.

Gradient descent is one way to find matrices P and Q. Solving the above-mentioned minimization function, we get the update (4) and (5).

$$\begin{aligned} q_{i} \longleftarrow q_{i} + \alpha (\epsilon _{ui} p_u - \lambda q_i) \end{aligned}$$
(4)
$$\begin{aligned} p_{u} \longleftarrow p_{u} + \alpha (\epsilon _{ui} q_i - \lambda p_u) \end{aligned}$$
(5)

where \( \alpha \) is the learning rate.

Advantages of MF The main advantages of MF are:

  • It works well with sparse data.

  • It is practical to implement.

Limitations of MF [7] The main limitation of MF is the linearity associated with it. Since MF only captures the linear relationship between the items and users, the accuracy of a model is lesser than that of the models that find non-linear patterns in the data. This can be explained with the following example shown in Fig. 4. \({P_4}\) is quite closer to \({P_1}\), with \({P_3}\) and \({P_2}\) following closely behind. However, putting \({P_4}\) closer to \({P_1}\) brings \({P_4}\) closer to \({P_2}\) than \({P_3}\). This is the problem due to linearity.

Fig. 4
figure 4

Linearity issue [7]

3.2 Euclidean embedding(EE)

An alternative latent factor model is Euclidean Embedding [3]. All the items and users are placed in an Euclidean space where the distance between them is inversely proportional to their rating. The location of the user defines his/her features, whereas the location of the item represents its features, like genre. As a result, (1) is modified to (6).

$$\begin{aligned} \hat{r}_{ui} = b_u+b_i+\mu -(x_u - y_i) (x_u - y_i)^T \end{aligned}$$
(6)

where, \(b_u\) represent user bias, \(b_i\) represents item bias and \(\mu \) represents global mean. Here \(x_u\) and \(y_i\) are user and item vectors in the D-dimensional Euclidean Space. We use squared Euclidean distance because of its computational efficiency. The error function is given in (7).

$$\begin{aligned} \epsilon _{ui} = r_{ui} -\hat{r}_{ui} \end{aligned}$$
(7)

The minimization expression is modified as mentioned in (8):

$$\begin{aligned} {\min }_{x,y} \sum _{u,i \in S} (r_{ui} -\hat{r}_{ui})^2 + \lambda (x_u - y_i)^2 \end{aligned}$$
(8)

where \( \lambda \) is regularization parameter that avoids overfitting and S is training dataset. Here \(x_u\) - \(y_i\) is included in the regularization term since the distance depends on the relative positions of \(x_u\) and \(y_i\) rather than individual absolute points. To learn the parameters, we use Stochastic Gradient Descent and the update (9) and (10).

$$\begin{aligned} x_{u} \longleftarrow x_{u} - \alpha (x_{u} - y_i)(\epsilon _{ui} + \lambda ) \end{aligned}$$
(9)
$$\begin{aligned} y_{i} \longleftarrow y_{i} + \alpha (x_{u} - y_i)(\epsilon _{ui} + \lambda ) \end{aligned}$$
(10)

3.3 Comparison between EE and MF

In EE, the square of Euclidean distance is used as a similarity component whereas in MF the dot product is used [3]. In EE, the search space is reduced, and hence it can provide faster and better recommendations compared to MF, as shown in Fig. 5.

The main advantage of using EE instead of MF is that the neighbourhood structure of the unified space provides better recommendations than MF. Solving the cold start problem is not trivial in MF, whereas in EE, mapping the new users and items into the existing model is easy. Therefore, it can be used as an online recommender system model.

3.4 Matrix factorization with preference relations [2]

In most of the recommender systems, explicit ratings are used to train and test the model. But preference relations are another way to provide better recommendations. The reason is that a user might give the same rating value to both of the items but may prefer one over the other item. Hence, the best way to recommend an item is using the preference relation rather than the ratings. The following function is used to define the preference relation between any item pair(ij) and the user u in (11).

$$\begin{aligned} {\pi }_{u,i,j} = {\left\{ \begin{array}{ll} 1 &{} ~~~ \text {if { u} likes { i} more than { j}}\\ 0.5 &{} ~~~ \text{ if } \text{ u } \text{ likes } \text{ i } \text{ and } \text{ j } \text{ equally } \\ 0 &{} ~~~ \text{ if } \text{ u } \text{ likes } \text{ j } \text{ more } \text{ than } \text{ i } \end{array}\right. } \end{aligned}$$
(11)

Now, the matrix factorization is implemented with preference relations instead of absolute ratings [2]. The user’s preference values for any pair of items (ij) are \(p_uq_i^T\) and \(p_uq_ j^T\), respectively. If \(p_uq_i^T\) is greater than \(p_uq_j^T\), the user likes item i more than item j. The following equation can be used to predict the preference relation using (12)

$$\begin{aligned} \hat{\pi }_{u,i,j} = \frac{e^{p_u{(q_i- q_j)}^T}}{1 + e^{p_u{(q_i- q_j)}^T}} \end{aligned}$$
(12)
Fig. 5
figure 5

Comparing EE and MF [3]

Here, we apply the sigmoid function in order to limit the value of \({\hat{\pi }_{u,i,j}}\) 1 to (13).

$$\begin{aligned} f(x)=\frac{e^x}{1+e^{x}} \end{aligned}$$
(13)

Figure 6 shows the plot of the sigmoid function whose maximum value is 1.

Fig. 6
figure 6

Plot of sigmoid function [20]

The error function is calculated using (14).

$$ \begin{aligned} err = \frac{1}{2} \sum _{(u,i,j,\pi (u,i,j)) \in K \& (i < j)}(\pi (u,i,j) - \frac{e^{p_u{(q_i- q_j)}^T}}{1 + e^{p_u{(q_i- q_j)}^T}})^2 \end{aligned}$$
(14)

where K refers to the training dataset.

The minimization expression is modified by (15).

$$\begin{aligned} {\min }_{p,q} \frac{1}{2} (err + R(p,q) ) \end{aligned}$$
(15)

where R(p,q) is regularization parameter to avoid overfitting. It is defined in (16):

$$\begin{aligned} R(p,q) = \lambda _p \sum _{u \in U} p_u^2 + \lambda _q \sum _{i \in I}q_i^2 \end{aligned}$$
(16)

where I and U denote the list of unique items and users, respectively. Like in MF, the goal here is to learn \({p_u}\), \({q_i}\) and \({q_j}\). This can be done by using the gradient descent algorithm with the help of the following update in (17), (18), and (19)

$$\begin{aligned} p_u = p_u + \gamma (\frac{err_{uij} \hat{\pi }(u,i,j)( q_i - q_j)}{1 + e^{p_u(q_i-q_j)^T}} ) + \lambda _p p_u ) \end{aligned}$$
(17)
$$\begin{aligned} q_i = q_i + \gamma (\frac{err_{uij} \hat{\pi }(u,i,j)(p_u)}{1 + e^{p_u(q_i-q_j)^T}} ) + \lambda _q q_i ) \end{aligned}$$
(18)
$$\begin{aligned} q_j = q_j - \gamma (\frac{err_{uij} \hat{\pi }(u,i,j)(p_u)}{1 + e^{p_u(q_i-q_j)^T}} ) + \lambda _q q_j ) \end{aligned}$$
(19)

where \(\gamma \) represents the learning rate. After learning the matrices, the next task is recommendation generation. Unlike in MF, items are not directly recommended based on the rating values. Instead, items are recommended in decreasing order based on the scores determined by the following function mentioned in (20), and \(x_u (i)\) is the user vector for an item i.

$$\begin{aligned} x_u (i) = \sum _{j \in I - \{i\}}{p_u(q_i-q_j)^T} \end{aligned}$$
(20)

where I denotes list of all unique items.

However, it is unnecessary to compute this scoring function between every pair of possible items. An alternative scoring function is defined in (21) with which we can recommend items:

$$\begin{aligned} y_u(i)= p_u q_i ^ T \end{aligned}$$
(21)

It is observed that both the scoring functions produce exactly the same top −k recommendations. and \(y_u (i)\) is user vector for an item i. We prefer to use the latter scoring function since it is computationally cheaper and efficient.

4 Proposed methodology

The details of our proposed work are presented in this section. The proposed work is divided into four phases, namely, Data prep-processing, representation of data, learning the model, making recommendations, and finally, evaluation (Fig. 7).

Fig. 7
figure 7

Flow chart showing the phases in the proposed system approach

4.1 Phase-1

Data pre-processing In this step, we perform data cleaning and prepare the data so that the model can learn from the preference values. In general, the current dataset that is available over the internet looks like \({<userid,itemid,rating>}\). But we need the preference values of each user between pairs of items. The preference value always lies between 0 and 1. So, we need the training dataset in the format \({<userid,item_iid,item_jid,preference value>}\). Since the dataset doesn’t contain the preference relations. Therefore, we derive them using the (11).

User-item representation As mentioned in [6], all items and users are assumed to be in a Euclidean space. In the Euclidean space, if the distance between any user u and any item i is smaller than the distance between u and any item j, user u prefers item i. \({x_u}, {y_i}\) and \({y_j}\) represents the user u, item i and item j features in euclidean space, respectively.

4.2 Phase-2: model learning with preference relations

The goal of this step is to learn the features of users and items so that the preference relations are predicted.

Step1: Prediction of preference relation can be predicted as mentioned in (22).

$$\begin{aligned} \hat{\pi } (u,i,j) = \frac{ e^{[(x_u - y_j) + (x_u-y_i)] [(y_j - y_i)']}}{1 +e^{[(x_u - y_j) + (x_u-y_i)] [(y_j - y_i)']} } \end{aligned}$$
(22)

Here we use the sigmoid function to limit the preference value not to exceeding 1.

Step2: Determining the loss function and minimization expression. The error function is similar to (14), and it is given in (23).

$$ \begin{aligned} err = \frac{1}{2} \sum _{(u,i,j,\pi (u,i,j)) \in K \& (i < j)}(\pi (u,i,j) - \frac{e^{x_u{(y_i- y_j)}^T}}{1 + e^{x_u{(y_i- y_j)}^T}})^2 \end{aligned}$$
(23)

where K is the training dataset.

The optimal values of \({x_u}, {y_i}\) and \({y_j}\) are found using the following minimization expression using (24).

$$ \begin{aligned} {\min }_{x,y} \frac{1}{2} \sum _{(u,i,j,\pi (u,i,j)) \in K \& (i < j)}(\pi (u,i,j) - \hat{\pi } (u,i,j) + R(x,y) ) \end{aligned}$$
(24)

where R(x,y) is the regularization function to reduce the effect of overfitting, and K is the Training set.

Step3: Update Equations. The features of items and users are learned by applying a stochastic gradient descent approach to training data. We get the update Equations for \({x_u}, {y_i}\) and \({y_j}\) using (25), (26), and (27).

$$\begin{aligned} x_u = x_u + \alpha (\frac{err_{uij} \hat{\pi }(u,i,j)( y_j - y_i)}{1 +e^{[(x_u - y_j) + (x_u-y_i)] [(y_j - y_i)']}} ) + \lambda _x x_u) \end{aligned}$$
(25)
$$\begin{aligned} y_i = y_i - \alpha (\frac{ err_{uij} \hat{\pi }(u,i,j)(x_u - y_i)}{1 +e^{[(x_u - y_j) + (x_u-y_i)] [(y_j - y_i)']}} ) + \lambda _y y_i ) \end{aligned}$$
(26)
$$\begin{aligned} y_j = y_j + \alpha (\frac{ err_{uij} \hat{\pi }(u,i,j)(x_u)}{1 +e^{[(x_u - y_j) + (x_u-y_i)] [(y_j - y_i)']}} ) + \lambda _y y_j ) \end{aligned}$$
(27)

where \(\lambda _x\) and \(\lambda _y\) are regularization parameters, while \(\alpha \) represents the learning rate.

4.3 Phase-3: generating recommendations

After learning the model parameters \({x_u}, {y_i}\) and \({y_j}\), items are recommended based on the scoring function similar to (20). Here, the score is computed in Euclidean space according to (6). This scoring feature is used to sort items so that the top-most k of those items is provided to the user. Using a scoring function similar to (21), we can improve the process of recommending items. As mentioned in [2], both the scoring functions give exactly the same recommendations. However, the later scoring function is computationally efficient.

4.4 Phase-4: evaluation

The obtained recommendations are evaluated using precision for top-K recommendations. In this methodology, it is not suggested to calculate RMSE and MAE. This is because of the fact that the predicted and actual preferences are not in the same range. The formula for calculating Precision@K is mentioned in the Section 5.

5 Experimental analysis

5.1 Dataset used

We conducted all the experiments on Movielens-100K dataset and Netflix1M dataset (Table 2). The MovieLens-100K dataset contains 943 users and 1682 items, with each user rating minimum of 20 items. A total of 100000 ratings are available for both training and testing. The ratings are in the range of 1 to 5. From the actual Netflix dataset, we used only a portion of it. This reduces the training time. We extracted the ratings in such a way that each user rated a minimum of 20 movies and a maximum of 500 movies. We took the first 1500 movies and removed few ratings such that a total of 1,34,000 ratings are available in the final dataset with 3998 users and 1250 movies. For both datasets, the training data makes up 80% of the overall dataset, while the testing data makes up the remaining 20%. We converted the training datasets into preference relations using (11).

Table 2 Outline of datasets used

5.2 Experimental setup

We implemented Matrix Factorization with preference relations and EEPR in this work. These experiments are conducted with preference relations that are derived using absolute ratings. The hyper parameters, learning rate \(\alpha \) is chosen as 0.01 and regularization parameters \(\lambda _p\),\(\lambda _q\) are set to 0.001 and 0.0005 respectively. For Matrix Factorization with preference relations while learning rate \(\alpha \) is chosen as 0.05 and regularization parameters \(\lambda _x\),\(\lambda _y\) is set to 0.001 and 0.0005 respectively for EEPR. We compute precision for the top-5 and top-10 recommendations. We used a threshold value of 3 while calculating precision. This process is repeated for different dimensions ranging from 20 to 120 with an interval of 20.

5.3 Evaluation metrics

Here, we provide the details of the metrics used in the model evaluation phase. In RS, especially while implementing the latent factor models, RMSE and MAE are used for evaluation. But, we used precision for the top-K items as the metric. The reason is that the actual values in the test dataset are in the range of 1 to 5. While the predicted values are not in the range of 1-5. Hence, we sort the items in the decreasing order of their score and will suggest the top-K items. We chose K values as 5 and 10. Precision for top-K [40] items can be found by the following equation:

$$\begin{aligned} Precision@K = \frac{\#\,top-K\, recommended\, and\, relevant\, items}{\# \,top-K\, recommended\, items} \end{aligned}$$
(28)

Here, relevant items represent those whose true rating is greater than or equal to the threshold. Recommended items are those generated by the recommender engine. In our experiments, we used three as the threshold.

Table 3 Result on MovieLens-100K dataset
Table 4 P-test and t-test on MovieLens-100K
Table 5 Result on Netflix-1M Dataset
Table 6 P-test and t-test on Netflix-1M

6 Results and analysis

Here we provide two tables in which the results of the conducted experiments are recorded. The values of precision for top-5 and top-10 recommendations provided by EEPR and existing techniques on MovieLens-100K dataset in Table 3. Table 5 displays the results on Netflix dataset for different dimensions. As shown in Table 3 precision@5 is 0.6402,  0.8592,  0.8880,  0.8919 for MEDCF, MF, MFPR, EE respectively for feature 20 on MovieLens-100K dataset. The proposed EEPR performance is not good with a value of 0.7908 in a lower dimension only. The proposed method is performing better in higher dimensions and performance is also increasing to 100 number of features. Precision@5 is 0.7842,  0.8607, 0.8845,  0.8936 for MEDCF, MF, MFPR, EE respectively for feature 60. However, our method (EEPR) outperforms the existing method with a value of 0.9263. Similarly, our methods perform better for features 80,  100,  120. Other used metric precision@10 is showing similar results. These results are similar for both used datasets.

From the results Tables 3 and 5, it is observed that the proposed algorithm works better in higher dimensions. Especially for the dimensions greater than 40, EE with preference relations clearly outperforms the MF with preference relations. As shown in Table 3 for the MovieLens-100K dataset, especially in the lower dimensional space EE with preference relations have lesser accuracy. This is due to the dataset constraints. While generating the preference relations from the MovieLens-100K dataset, we did not consider the dense and sparse users separately (Table 4). As shown in Table 5 for the Netflix dataset proposed algorithms work the same as MF with preference even in the lower dimensions. Tables 4 and 6 shows the p-test and t-test.

7 Conclusion and future work

We demonstrated various latent factor models that are popular in Recommender Systems. We also provided the details of Matrix Factorization, Euclidean Embedding, MF with Preference relations, and EE with preference relations techniques with the equations. From the results, we conclude that EE with preference is an alternative latent factor model and is comparable with MF with the Preference relations technique. The proposed method clearly outperforms the existing method in higher dimensions as displayed in the results. Hence EE with Preference relations can be used in recommender systems for better recommendations to the user. We also observe that EEPR gives better recommendation results than EE, like MFPR gives better recommendation results than MF. So it can be concluded that higher-order information derived from the first-order information has the potential to improve the recommendation results. However, as a drawback, the proposed model has a greater time complexity compared to MF and EE due to the extraction of preference relations.

Since latent factor models work better for group recommender systems, the proposed work can be implemented for groups. This work can also be extended by using the side information in the dataset to get better recommendations. In this work, we used the traditional machine learning paradigm to attain optimal weights while learning the model. We can attain better precision and recall values if implemented in a deep learning framework. This work can be explored in a group recommendation system(GRS) using group modeling strategies.