# TD-DNN: A Time Decay-Based Deep Neural Network for Recommendation System
## 4 Proposed Methodology
### Data Preprocessing Phase
#### 4.1.1 Detecting and Correcting the Noisy Ratings  
There are two types of noise [50]: malicious noise and natural noise. Malicious noise is introduced by an external agent, whereas natural noise is what users introduce. It might happen due to a user's inconsistent or negligent behavior. This paper focuses on natural noise because it is a relatively new issue that has received far less attention. It occurs due to the inconsistency in the user preference and item ratings. To identify natural noise/noisy ratings, the user, item, and ratings are classified into predetermined classes (based solely on ratings). In this classification, if the user and item fall in the same category, then the rating must also belong to the same category. If the rating does not verify this, it is considered a noisy or noise or inconsistent rating. The noisy ratings are determined as follows:  
Firstly, users are categorized into Weak_user, Average_user, and Strong_user sets, and items are categorized into Weak_item, Average_item, and Strong_item sets, as given in Table 1. The belongingness of the users and items in their respective sets depends upon the condition specified in Table. If the rating is less than the T1_u then add the rating to the Weak_user set, if the rating is greater than or equal to T1_u and less than T2_u, then add the rating to the Average_user set, and if the rating is greater or equal to T2_u, then add the rating to the Strong_user set. In the same way, if the rating is less than T1_i, then add the rating into the Weak_item set, if the rating is greater or equal to T1_i and less than T2_i, add the rating to the Average_item set, and if the rating is greater than the T2_i, then add the rating to the Strong_item set. In Table 1, T1_u and T2_u are the threshold values of users, and T1_i and T2_i are the threshold values of items. These threshold values are obtained through the formula specified in Table 2.  
Figure 1: Data preprocessing steps. In Table 2, \(\mathrm{R}^{\mathrm{min}}\) and \(\mathrm{R}^{\mathrm{max}}\) are the minimum and maximum values in the rating scale, respectively. After determining the threshold values, the users, items, and ratings are classified into three categories, as displayed in Table 3. In the table, users are classified into Critical, Average, and Benevolent. Items are classified into Weakly recommended, Averagely recommended, and Strongly recommended, and ratings are classified into Weak, Average, and Strong. A critical user is the one who gives a low rating to items, an average user provides the average rating to items, and a benevolent user is the one who gives a high rating to items. Similarly, if the majority of people dislike the item, it is Weakly recommended, and if the majority of users averagely like it, it is Averagely recommended. If most users prefer the item, it is categorized as Strongly recommended. Similarly, if the rating is less than \(\mathrm{T}^{1}\) (threshold value), it is a Weak rating. If the rating is greater or equal to \(\mathrm{T}^{1}\) and less than \(\mathrm{T}^{2}\), it is an Average rating, and if the rating is greater than \(\mathrm{T}^{2}\), it is a Strong rating. Table 4 defines the three categories of homologous classes according to the classes of users, items, and ratings defined in Table 3. If the classes associated with the user and item are similar, then the ratings must also belong to a similar category. If this does not happen, we can say that the rating is noisy. For example, if the user is strong, the item is strongly recommended, and if the rating is average, we can say that the rating is noisy.