Recently Published
Document
study purpose
Rpart.Plot
decision_tree <- rpart(Political.regime ~ Talent + Infrastructure + AI_Capability_Index + Public_Sector_Innovation,
data = df, method = "class")
# Plot the decision tree
rpart.plot(decision_tree, type = 2, extra = 104, under = TRUE, faclen = 0, cex = 0.8)
From Menarche to Menopause: Using Generative AI to Explore the Reproductive Life Cycle
Our team, Ctrl+Alt+Defeat, is excited to participate in this year’s Women in Data: Datathon 2024 with a project focused on generative AI and its role in supporting reproductive health decisions. As a team composed of individuals who have experienced menstruation, we understand the critical need for the 1.8 billion people worldwide who menstruate and approximately 1.2 billion people who are menopausal or postmenopausal to have access to reliable and unbiased information. Our research aims to uncover biases in generative AI and identify fairness gaps affecting inclusivity.
Proyecto 1 Regresion Lineal
Autores:
Xavi Stevn Restrepo Montoya
Juan Esteban Londoño Bejarano
Laura Sofia Giraldo Bolaños
Jeffer Cabezas Sevillano
custom annotations to describe the clusters
# Add custom annotations to describe the clusters
ggplot(hclust.project2D, aes(x = PC1, y = PC2)) +
geom_point(aes(shape = cluster_label, color = cluster_label), size = 3) +
geom_text(aes(label = country, color = cluster_label), hjust = 0, vjust = 1, size = 3) +
geom_polygon(data = hclust.hull, aes(group = cluster, fill = as.factor(cluster)),
alpha = 0.4, linetype = 0) +
theme_minimal() +
labs(title = "Geopolitical Decisions Based on AI Capabilities",
x = "Principal Component 1 (AI Capability)",
y = "Principal Component 2 (Government Strategy)",
color = "Cluster",
shape = "Cluster") +
scale_fill_manual(values = c("#FF9999", "#99CCFF", "#66CC66"), labels = c("AI Leaders", "Emerging AI Players", "Tech Adopters")) +
theme(text = element_text(size = 16)) +
annotate("text", x = 5, y = -2, label = "AI Leaders: Advanced AI capabilities, \nForm AI alliances, Lead AI standards",
color = "#FF9999", size = 5, hjust = 0) +
annotate("text", x = -4, y = 3, label = "Emerging AI Players: Focus on AI regulation, \nBuild partnerships for growth",
color = "#99CCFF", size = 5, hjust = 0) +
annotate("text", x = -6, y = -5, label = "Tech Adopters: Focus on cybersecurity, \nEnsure digital sovereignty",
color = "#66CC66", size = 5, hjust = 0)
clusters with meaningful labels
library(ggplot2)
# Plot the clusters with meaningful labels
ggplot(hclust.project2D, aes(x = PC1, y = PC2)) +
geom_point(aes(shape = cluster_label, color = cluster_label), size = 3) +
geom_text(aes(label = country, color = cluster_label), hjust = 0, vjust = 1, size = 3) +
geom_polygon(data = hclust.hull, aes(group = cluster, fill = as.factor(cluster)),
alpha = 0.4, linetype = 0) +
theme_minimal() +
labs(title = "Geopolitical Decisions Based on AI Capabilities",
x = "Principal Component 1 (AI Capability)",
y = "Principal Component 2 (Government Strategy)",
color = "Cluster",
shape = "Cluster") +
scale_fill_manual(values = c("#FF9999", "#99CCFF", "#66CC66"), labels = c("AI Leaders", "Emerging AI Players", "Tech Adopters")) +
theme(text = element_text(size = 16))
Project2d
# data prepare for clustering visualization
princ <- prcomp(scaled_data)
nComp <- 2
project2D <- as.data.frame(predict(princ, newdata=scaled_data)[,1:nComp])
hclust.project2D <- cbind(project2D, cluster=as.factor(groups), country=df$Country)
head(hclust.project2D)
library('grDevices')
find_convex_hull <-function(proj2Ddf,groups) {
do.call(rbind,
lapply(unique(groups),
FUN= function(c){
f<-subset(proj2Ddf,cluster==c); f[chull(f),]
} ) ) }
hclust.hull <-find_convex_hull(hclust.project2D,groups)
library(ggplot2)
ggplot(hclust.project2D, aes(x=PC1,y=PC2)) +
geom_point(aes(shape=cluster,color=cluster)) +
geom_text(aes(label=country,color=cluster),hjust=0,vjust=1, size=3) +
geom_polygon(data=hclust.hull, aes(group=cluster,fill=as.factor(cluster)),
alpha=0.4, linetype=0) + theme(text=element_text(size=20))