Recently Published

DOI Test
This is a test to produce DOI coverage statistics of JUOJS
BoxPlot
# Add cluster information to the dataset df$Cluster <- groups # Plot the boxplot ggplot(df, aes(x = as.factor(Cluster), y = AI_Capability_Index, fill = as.factor(Cluster))) + geom_boxplot() + labs(title = "Distribution of AI Capability Index by Cluster", x = "Cluster", y = "AI Capability Index") + theme_minimal()
BarPlot
# Calculate the mean AI_Capability_Index for each cluster and region library(dplyr) cluster_summary <- df %>% mutate(cluster = groups) %>% group_by(cluster, Region) %>% summarise(mean_AICapability = mean(AI_Capability_Index, na.rm = TRUE)) # Plot the bar plot library(ggplot2) ggplot(cluster_summary, aes(x = Region, y = mean_AICapability, fill = as.factor(cluster))) + geom_bar(stat = "identity", position = "dodge") + labs(title = "AI Capability Index by Region and Cluster", x = "Region", y = "Mean AI Capability Index", fill = "Cluster") + theme_minimal()
Assignment 5
Intro to notebook.
Basics.
Anthony-Games-Report-111024
Anthony-Games-Report-111024 for ConRR, MPhil PHS Cambridge
Dendrogram
Dendrogram is a tree-like diagram that shows the hierarchical structure of the clusters library(dynamicTreeCut) dist_matrix <- dist(merged_data[, -1]) # Assuming the first column is 'Region' hclust_model <- hclust(dist_matrix, method = "ward.D2") options(repr.plot.width = 16, repr.plot.height = 10) plot(hclust_model, labels = merged_data$Region, main = "Hierarchical Clustering Dendrogram", xlab = "Region", ylab = "Height", sub = "", cex = 0.4, las = 2) rect.hclust(hclust_model, k = 5, border = "red") dendro_colors <- cutreeDynamic(hclust_model, distM = as.matrix(dist_matrix), method = "tree") plot(hclust_model, labels = merged_data$Region, main = "Hierarchical Clustering Dendrogram with Dynamic Cut", xlab = "Region", ylab = "Height", sub = "", cex = 0.4, las = 2) rect.hclust(hclust_model, k = 5, border = "red")
Test2
rpart
> library(rpart) > library(rpart.plot) > > # Train decision tree model > decision_tree <- rpart(Decision ~ AI_Capability_Index + Public_Sector_Innovation + Talent + Infrastructure + Government.Strategy, + data = merged_data, method = "class") > > # Plot the decision tree > rpart.plot(decision_tree, type = 3, extra = 104, fallen.leaves = TRUE, main = "Geopolitical Decisions")