## 3 Formation of Heterogeneous Groups
### Clustering Techniques for the Formation of Homogeneous Clusters  
Figure 1 shows the flow of online activities, research, software development and the creation of heterogeneous groups. The process for forming heterogeneous groups required distinct work phases:  
1. implementation of clustering techniques for the formation of homogeneous groupings for similar characteristics and behaviors of the students during the use of the individual online course;
2. performance evaluation of cluster algorithms;
3. selection of the best clustering algorithm;
4. development of an automatic software able to select the students from the different homogeneous groupings for the formation of heterogeneous groups.  
During the first step of the research project, after a selection, we extracted all the Learning Analytics related to student behavior produced on the platform after completing the individual online course part: login frequency, last login, total time spent online, number of video tutorials viewed, frequency of video tutorials viewed, number of video experiments viewed, frequency video experiments viewed, number of web pages viewed,  
Figure 1: Sequence diagram of the flow of activities, research, and software development.  
number of pdf files downloaded, number of exercises performed. To simplify the data file, we have grouped them into features, i.e., data belonging to the same type of activities (e.g., visualization of the 5 video experiments) have been aggregated into the same feature. The feature is one individual and measurable property of an observed phenomenon [26]. For the characterization of the students and the creation of homogeneous groupings, we used only quantitative data. We didn't use the evaluation of the tasks, to avoid that the weight of the grade could influence the process subdivision of students. The evaluations of the individual essays were instead used later to verify the effectiveness of clustering techniques. More precisely, we compared the essay evaluations with the clusters (groupings) to check if there was a correlation between them, in order to verify if the behavior of students influenced their final performance. Before applying the clustering algorithm, the collected data are pre-processed. Each student was represented by an \"input vector\" with features related to the values of the attributes associated with the student.  
All data, organized in feature vectors, one for each student, were inserted into a single Excel file, called a dataset, which represents the software input file to create clusters. To have the same scale of values, the data have been normalized in a range from 0 to 1. We then moved on to the realization of the software for the creation of homogeneous groupings using Python as a programming language, because it has a large number of libraries for data processing using Machine Learning algorithms. Initially the software takes the dataset as input and processes it to determine the number of clusters to create. This number must be provided to the clustering algorithm.  
For the selection of the algorithms, an analysis of the best clustering algorithms was carried out to better determine the behavior of the students in the e-learning platforms. Based on the literature [27; 28; 29; 30; 31], the best clustering algorithms were selected to identify student behaviors in the e-learning environment. We decided to test six different clustering algorithms, in order to determine which algorithm was best for our purpose:  
1. K-means.
2. Mean-Shift Clustering.
3. Agglomerative Clustering.
4. Density-based spatial clustering of applications with noise (DBSCAN).
5. Gaussian Mixture Models Clustering.
6. Self-Organizing Map (SOM).