# AI-Based Learning Recommendations: Use in Higher Education +
## 2 LXP Architecture: Design and Implementation
### AI-Based Recommender Modules
#### 2.4.1 Trending Learning Resources  
Interactions with resources are often used to calculate trends. These resources, which are popular among learners, already tell us that they have been vetted by other learners, and that learners have already found value in it. The use of trends and systems that predict recommendations based on these trends has been extensively studied over a long period of time, providing insight into their strengths, limitations, and advantages.  
Various algorithms and technologies have already been proposed and developed for use in this field, such as slope analysis (Mann-Kendall and Sen's slope analysis), z-score calculations, and chi-squared tests [23; 24]. However, we have selected the z-score to calculate the trends. Various sample sizes are used in different courses, ranging from 7 days to 14 days, to evaluate the results of the trends. The Z score (or standard score) is especially helpful because it calculates the probability of a score falling within a normal distribution and allows two scores to be compared from different distributions [25].  
Supposing that the number of clicks \(x\) to a learning resource follows a normal distribution, where the mean is specified by \(\mu\) and the standard deviation by \(\sigma\), the time series can then be standardized by [26; 27]:  
\[z=\frac{x-\mu}{\sigma} \tag{1}\]  
The standardized \(z\), shown in Equation (1), follows a standard normal distribution. This value can be used to identify trends. A higher and positive value signifies that the learning resource is popular. In contrast, a negative value of \(z\) indicates that the resource is falling out of trends.  
To effectively use this score, we have taken several factors into account. First, the period of specific days was considered. This period is considered a window. We divided the window into panes. The length of a pane is one day. The trending-items plug-in tracks the action (clicks) of a particular resource for the whole duration of a window. The window then slides daily, removing the last pane and adding a new pane for the current day, thereby making it a continuous sliding window.  
Furthermore, the window is divided into two sections: history panes and current panes. The history panes are used to calculate the mean and standard deviation of the time-series data. Alternatively, current panes are used to calculate the z-scores. The average of the z-scores in the current panes, as shown in Equation (2), represents the final score of the learning resource. This score is then compared with other resources, and those resources with the highest scores are displayed in the trending items plug-in. Figure 6 shows this design.  
Figure 6: Window panes and z-score calculations.  
The average z-score for current panes is given by the formula:  
\[z_{avg}=\frac{\sum_{i=1}^{I_{p}}\frac{x_{i}-\mu}{\sigma}}{I_{p}} \tag{2}\]  
\(I_{p}=\) Number of current panes.  
\(x_{i}=\) Number of clicks stored in the \(i^{th}\) pane.  
\(\mu=\) Mean number of clicks calculated from the history panes.  
\(\sigma=\) Standard deviation calculated from the history panes.  
During initial testing of the trending items plug-in, we observed minimal latency due to our external server being located within the same local network.