R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

simulate_student_features <- function(n = 500) {
  set.seed(260923)  # Ensuring reproducibility
  
  student_ids <- seq(1, n)
  student_engagement <- rnorm(n, mean = 50, sd = 10)
  student_performance <- rnorm(n, mean = 60, sd = 15)
  
  data.frame(
    student_id = student_ids,
    student_engagement = student_engagement,
    student_performance = student_performance
  )
}
student_features <- simulate_student_features(n = 500)
#student_features <- simulate_student_features(n = 100)
library(caret)
preproc <- preProcess(student_features[, -1], method = "pca", pcaComp = 2)
student_pca <- predict(preproc, student_features[, -1])
set.seed(123)  # For reproducibility
km_results <- kmeans(student_pca, centers = 3)

Including Plots

library(cluster) agglom_results <- agnes(student_pca, method = “average”) table(km_results\(cluster) plot(km_results\)centers, col = 1:3, pch = 8, cex = 2) # Perform hierarchical clustering d <- dist(student_pca) # Compute the distance matrix hc <- hclust(d, method = “ward.D2”) You can also embed plots, for example:

## 
##   1   2   3 
## 162 184 154

OUTPUT REPORT

Approach to Dimensionality Reduction and Clustering

To explore patterns in student engagement and performance, we applied dimensionality reduction and clustering to the dataset of 500 simulated students. Dimensionality reduction was performed using Principal Component Analysis (PCA), which simplifies the complexity of our data by transforming it into two principal components (PC1 and PC2). This helps in visualizing the high-dimensional data in a two-dimensional space, which can then be used for clustering.

Clustering was conducted using two methods: KMeans and Hierarchical Clustering. KMeans was used to partition the data into three clusters, chosen based on the preliminary assessment of the PCA plot. The hierarchical clustering was performed using Ward’s method, which is depicted in the dendrogram, allowing us to assess potential cluster hierarchies and relationships at different levels of aggregation.

Results of the Analysis

The KMeans clustering identified three distinct clusters, with the following distribution: Cluster 1 (162 students), Cluster 2 (184 students), and Cluster 3 (154 students). The centroids of these clusters, indicated by stars in the PCA plot, represent the mean value of the students’ features within each cluster, providing a reference point for the cluster’s profile.

The dendrogram from the hierarchical clustering illustrates how individual students (or smaller clusters) are merged into larger clusters as the distance or dissimilarity threshold increases. This visual representation enables us to trace the clustering process and potentially choose a different number of clusters, if necessary, by cutting the dendrogram at the desired height.

Discussion and Implications for Learning Analytics

Interpreting the clusters can reveal insights into student behaviors and learning outcomes. For example, students in Cluster 1 could represent a group with lower engagement and performance compared to Clusters 2 and 3. This hypothesis can be validated by examining the values of the principal components for each cluster.

Such insights are valuable for learning analytics as they can inform tailored interventions. Students in the lower-performing cluster may benefit from additional support and resources, while those in higher-performing clusters might be challenged with more advanced materials to maintain their engagement and performance.

The hierarchical clustering results provide a nuanced view of student groupings and suggest that learning behaviors may exist on a spectrum rather than in discrete groups. This could indicate that interventions should be flexible and scalable, adapting to the varying levels of student engagement and performance reflected across the hierarchy.

Finally, the application of unsupervised learning in this context underscores the potential of machine learning in educational settings. By identifying and understanding the diverse patterns in student data, educators and administrators can design evidence-based strategies to enhance learning outcomes.