# An Improved Collaborative Filtering Recommendation Algorithm Based on Retroactive Inhibition Theory
## 3 Proposed Model: RICF
### Preliminary  
Suppose that there are a user set \(\mathbf{U}=\{u_{1},u_{2}\cdots u_{n}\}\) and an item set \(\mathbf{O}=\{\mathbf{o_{1}},\mathbf{o_{2}}\cdots\mathbf{o_{m}}\}\), we define the rating pair \(\big{(}r_{ij},t_{ij}\big{)}\), where \(r_{ij}\) represents the rating for user \(\mathbf{u_{i}}\) to item \(\mathbf{o_{j}}\) and \(\mathbf{t_{ij}}\) is the time when user \(\mathbf{u_{i}}\) rates item \(\mathbf{o_{j}}\). The vector \(\vec{u_{i}}\) represents the rating pair set of user \(\mathbf{u_{i}}\). If user \(\mathbf{u_{i}}\) does not rate item \(\mathbf{o_{j}}\), then the corresponding rating pair is empty. Finally, the rating matrix \(\mathbf{M}\) is defined as follows,  
\[\mathbf{M}=\left[ \begin{array}{c}\begin{array}{c}\vec{u_{1}}\\ \vec{u_{1}}\\ \vec{u_{2}}\\ \vdots\\ \vec{u_{i}}\\ \vdots\\ \vec{u_{n}}\end{array}\end{array} \right]=\left[ \begin{array}{ccc}\big{(} \mathbf{r_{11}},\mathbf{t_{11}}\big{)}&\cdots&\big{(}\mathbf{r_{1m}},\mathbf{t_{1m}}\big{)} \\ \vdots&\ddots&\vdots\\ \big{(}\mathbf{r_{n1}},\mathbf{t_{n1}}\big{)}&\cdots&\big{(}\mathbf{r_{nm}},\mathbf{t_{nm}} \big{)}\end{array} \right], \tag{1}\]  
Definition 1 (Retroactive Inhibition Strength) is given an item set \(\mathbf{O}=\{\mathbf{o_{1}},\mathbf{o_{2}}\cdots\mathbf{o_{m}}\}\) and a user set \(\mathbf{U}=\{\mathbf{u_{1}},\mathbf{u_{2}}\cdots\mathbf{u_{n}}\}\), then we can assign each item \(\mathbf{o_{j}}\) a label \(\mathbf{k}\) to record the cluster (we call it the preference point) \(\mathbf{k}\) it belongs to after concluding the clustering of items in the item set, considering the result of cluster shows the preference distribution of users. After that, the retroactive inhibition strength for item \(\mathbf{o_{n}}\) (belongs to the preference point \(\mathbf{k}\)) rated by user \(\mathbf{u_{i}}\) from time \(\mathbf{t_{in}}\) to time \(\mathbf{t_{in}}\) can be defined as follows,  
\[\mathbf{RI}_{int\to im}=\sum_{k^{\prime}\in\mathbf{K}_{int\to im}}\mathbf{ Dist}(\mathbf{k},k^{\prime}), \tag{2}\]  
\(\mathbf{RI}_{int\to im}\) represents the total impact of retroactive inhibition on \(\mathbf{u_{i}}\)'s preference on the preference point \(\mathbf{k}\) that \(\mathbf{o_{n}}\) belongs to, where \(\mathbf{K}_{int\to im}\) in the Equation (2) is a collection of preference points to which \(\mathbf{u_{i}}\)'s rated items belong from time \(\mathbf{t_{in}}\) to time \(\mathbf{t_{in}}\). Moreover, retroactive inhibition is caused by the influence of other stronger preferences or the same preference from time \(\mathbf{t_{in}}\) to time \(\mathbf{t_{in}}\), we defined the \(\mathbf{Dist}\) function to calculate preference distance between \(\mathbf{k}\) and \(\mathbf{k^{\prime}}\) for user \(\mathbf{u_{i}}\), as shown in Equation (3). \[\mathbf{Dist}(\mathbf{k},\mathbf{k^{\prime}})=\left\{ \begin{array}{c}\mathbf{0}, \mathbf{r}(\mathbf{k^{\prime}})\leq\mathbf{r}(\mathbf{k})\ \mathbf{and}\ \mathbf{k^{\prime}}\
eq\mathbf{k}\\ \mathbf{r}(\mathbf{k^{\prime}})-\mathbf{r}(\mathbf{k}),\mathbf{r}(\mathbf{k^{\prime}})>\mathbf{r}(\mathbf{k}) \ \mathbf{and}\ \mathbf{k^{\prime}}\
eq\mathbf{k}\\ -\big{(}\mathbf{r}(\mathbf{k^{\prime}})-\mathbf{r}(\mathbf{k})\big{)},\mathbf{k^{\prime}}=\mathbf{k} \end{array} \right. \tag{3}\]  
where function \(\mathbf{r}\) aims to measure the cumulative strength of a user's preference for a particular preference point within the specified time period. Specifically, \(\mathbf{r}(\mathbf{k^{\prime}})\) is the function to get the average rating among the rating records which rated from time \(\mathbf{t_{in}}\) to time \(\mathbf{t_{in}}\) with the preference point \(\mathbf{k^{\prime}}\), and \(\mathbf{r}(\mathbf{k})\) is the function to get the average rating among the rating records that rated earlier than \(\mathbf{t_{in}}\) with the preference point \(\mathbf{k}\).