# A Hybrid Group-Based Food Recommender Framework for Handling Overlapping Memberships
## 3 ITGR Framework
FCM divided the users into \(c\) number of clusters, allowing them to belong to each cluster individually. FCM's objective function is defined as follows [27]:  
\[O=\sum_{i=1}^{c}\sum_{k=1}^{n}{{{m}_{ik}^{m}}d_{ik}^{2}}. \tag{1}\]  
\[d_{ik}^{2}={{|x_{k}-v_{i}|}^{2}}. \tag{2}\]  
\[\sum_{i=1}^{c}{{{\mu}_{ik}}}=1,\ \ \ \forall k=1,\ldots,n. \tag{3}\]  
Equation (1) represents the objective function of the FCM algorithm, where \(O\) is the overall objective value. In this equation, \(u_{ik}\) denotes the degree of membership of data point \(x_{k}\) in cluster \(i\), \(v_{i}\) represents the centroid of cluster \(i\), \(d_{ik}^{2}\) is the squared Euclidean distance between data point \(x_{k}\) and the centroid \(v_{i}\), \(c\) represents the overall number of clusters, \(n\) represents the overall number of users, and \(m\) represents the fuzziness parameter \(1.25\leq m\leq 2\). The squared Euclidean distance \(d_{ik}^{2}\) in (2) is calculated as the square of the difference between data point \(x_{k}\) and centroid \(v_{i}\). According to (3), each user's overall membership value for each cluster/group corresponds to 1. It is essential to minimize the objective function [27]. \[v_{i}=\sum_{k=1}^{n}\ {{{\mu}_{ik}^{m}}x_{k}}. \tag{4}\]  
\[{{\mu}_{ik}}=\ \left[{\sum_{i=1}^{c}\ \left({\frac{{{d}_{ik}}}{{djk}}} \right)^{\frac{2}{m-1}}}\right]^{-1} \tag{5}\]  
Equation (4) represents the centroid update step in FCM, where \(v_{i}\) is the center of the \(i^{th}\) cluster and \({{\mu}_{ik}}\in M\) is the user \(k\)'s membership in the cluster \(i\). The degree of membership in (5) is calculated across all the clusters. After forming the clusters, Pearson similarity in (6) is utilized to calculate the similarity among users within each group, to find the intragroup similarity. To assess the similarity between two users, \(u\) and \(v\), the PCC computes similarity based on the shared ratings of items by these users. The formula of PCC is as follows [31]:  
\[Sim_{u,v}=\frac{{{\Sigma}_{i\in I}}({{r}_{u,i}}-\overline{{{r}}_{u}})({{r}_{v,i}}-\overline{{{r}}_{v}})}{{\sqrt{{\Sigma}_{i\in I}}({{r}_{u,i}}-\overline{{{ r}}_{u}})^{2}}\ \sqrt{{{\Sigma}_{i\in I}}({{r}_{v,i}}-\overline{{{r}}_{v}})^{2}}} \tag{6}\]The range of PCC is [\(-1\), \(+1\)], with positive values denoting a significant degree of user similarity, whereas a negative correlation shows a lack of similarity. The following formula computes how similar users \(u\) and \(v\) are in cluster \(k\):  
\[Sim_{uvc}=Sim_{u,v}\times\mu_{vc}. \tag{7}\]  
where \(Sim_{uvc}\) represents the amount of similarity between users \(u\) and \(v\), with \(v\) belonging to cluster \(c\). The top-\(k\) similar users were chosen to form a group based on (7). We used DNCF [28] to predict the recipes of group members after the group was formed. As shown in Figure 3, the DNCF is a layered model having an input layer, hidden layers, and an output layer. The output layer employs the sigmoid activation function. The input layer has two feature vectors, \(v_{u}^{U}\) and \(v_{i}^{I}\), which describe the user \(u\) and recipe \(i\), respectively. The following equations were used to determine the parameter \(\hat{y}_{ui}\), which was the projected rating of user \(u\) on recipe \(i\)[28]:  
\[\hat{y}_{ui}=f\Big{(}P^{T}\;v_{u}^{U}\;,\;Q^{T}\;v_{i}^{I}\;\Big{|}P,\;Q,\theta _{f}\Big{)}. \tag{8}\]  
Here, \(P\in R^{U\times K}\) and \(Q\in R^{I\times K}\) stand for the latent factors for users and recipes, respectively. Moreover, \(f\) stands for the layered neural network, while \(\theta_{f}\) stands for model parameters. The following defines the DNCF loss function:  
\[ \begin{split}& L=-\sum\limits_{(u,i)\in\hat{y}}log\hat{y}_{ui}- \sum\limits_{(u,i)\in\hat{y}}log(1-\hat{y}_{j})\\ &=-\sum\limits_{(u,i)\in\hat{y}}y_{ui}log\hat{y}_{ui}+(1-y_{ui}) log(1-\hat{y}_{ui}).\end{split}  \tag{9}\]  
The unseen interaction between the user and the recipe is represented by \(\hat{y}\) and the observed interaction is represented by \(\hat{y}\). The objective function of DNCF is represented in (9).