### Educational Data Mining (EDM) Procedures  
As already indicated, the analysis and interpretation of the logs generated in LMSs has certain difficulties and requires the teacher to have skills in the use of data extraction and interpretation techniques [32]. If LMSs included EDM and data visualisation techniques [21,33], this would make it easier to detect the student at risk. EDM procedures include different techniques, one of the simplest being frequency analysis with heat maps [34]. This is a visualisation technique that allows users to see the frequencies of the accesses to the different resources of the LMS in different colours, creating a heat map. The variation of the colours is made by tone and intensity, offering the teacher quick visual information of the results. Additionally, it allows the detection of outliers (both above and below the average frequency) in different learning objects (resources and activities) on the platform. An example of a heat map visualisation is shown in Figure 1; in this case, the dark red colour indicates the students at maximum risk, i.e., with zero participation values, the light red colour indicates the students in the first quartile, the dark ochre colour represents the students in the second quartile, the light ochre colour is the students in the third quartile, the light green colour shows the students in the fourth quartile, and the dark green colour indicates the students with the highest participation value in Moodle. Besides, more complex EDM techniques such as supervised learning can be used [36,37]. These guide the prediction of the student at risk according to different variables or attributes. For this purpose, classification techniques (e.g., support vector machine, discriminant analysis, Bayesian networks and nearest neighbour, decision trees, neuronal networks, ensemble methods) and prediction techniques (linear regression, regression trees, support vector machine, etc.) can be used [38]. Similarly, within the unsupervised learning techniques, clustering techniques are included [33], in which the \(k\)-means, \(k\)-means \(++\), fuzzy \(k\)-means, and DBSCAN (density-based spatial clustering of applications with noise) algorithms [39] stand out. In this article, we will look more closely at the use of clustering techniques, because they facilitate the analysis of student learning behaviour in LMSs [33]. Moreover, they facilitate the detection of groups of students according to the different behaviours in the different learning objects (resources and activities). One of the most widely used algorithms is \(k\)-means [33]. With an X-set and a distance measure d: \(X\times X\rightarrow\mathbb{R}\). The output of the \(k\)-means algorithm is a set of centres \(C=\{c_{1},\,c_{2},\,\ldots,\,c_{k}\}\) which implicitly define a set of clusters in which each point belongs to the cluster represented by the nearest centroid, \(\Phi=c(x)=argmin_{c\in C}\), d(x, c); the aim is to find the C-set that minimises the sum of the squared distances (see Equation (1)). \[\Sigma_{x\in X}\,d(\Phi_{C}\,(x),\,x)^{2} \tag{1}\]The problem that \(k\)-means is trying to solve is to find the groupings that minimise the distance within each group, although this is an NP-hard problem. In practice, \(k\)-means is very fast, but it often gets stuck in local minima, so it may be useful to repeat the execution several times. A variant is the \(k\)-means ++ algorithm, which intelligently initialises the centroids to accelerate the convergence of the algorithm [40]. Other clustering algorithms are fuzzy \(k\)-means [22] and density-based spatial clustering of applications with noise (DBSCAN). Fuzzy \(k\)-means also tries to minimise the same objective function described on Equation (1), but in this case, the membership of an instance to a cluster is not strict, but rather it is fuzzy; the membership of an instance to a cluster is a function that can take values between 0 and 1.