-
Notifications
You must be signed in to change notification settings - Fork 5
/
script_figure_1.R
31 lines (25 loc) · 1.46 KB
/
script_figure_1.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
rm(list = ls())
# set working directory
#setwd("~/Downloads/EttuBench")
# load supporting libraries
library(ggplot2)
comparison <- read.csv(file = "./data/result.csv", header = TRUE)
comparison$dataset <- factor(comparison$dataset,
levels = c("IIT Bombay Dataset",
"UB Exam Dataset",
"PocketData-Google+"))
ggplot(data = comparison, aes(x = metric, y = silhouette, fill = regularization)) +
geom_bar(position="dodge", stat="identity") + facet_grid(~ dataset) +
ylab("Average Silhouette Coefficient") + xlab("Metric") +
theme_bw(base_size = 18) + theme(legend.position = "top") + scale_fill_grey() +
ggsave(filename = "./figure/compare_silhouette.eps", height = 5, width = 9)
ggplot(data = comparison, aes(x = metric, y = beta_cv, fill = regularization)) +
geom_bar(position="dodge", stat="identity") + facet_grid(~ dataset) +
ylab("BetaCV") + xlab("Metric") +
theme_bw(base_size = 18) + theme(legend.position = "top") + scale_fill_grey() +
ggsave(filename = "./figure/compare_betacv.eps", height = 5, width = 9)
ggplot(data = comparison, aes(x = metric, y = dunn, fill = regularization)) +
geom_bar(position="dodge", stat="identity") + facet_grid(~ dataset) +
ylab("Dunn Index") + xlab("Metric") +
theme_bw(base_size = 18) + theme(legend.position = "top") + scale_fill_grey() +
ggsave(filename = "./figure/compare_dunn.eps", height = 5, width = 9)