-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/UBOdin/EttuBench
- Loading branch information
Showing
14 changed files
with
570 additions
and
57 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,30 @@ | ||
# set working directory | ||
#setwd("~/Downloads/EttuBench") | ||
|
||
# load two files evaluation.R and utils.R | ||
source(file = "./evaluation.R") | ||
source(file = "./utils.R") | ||
|
||
# load supporting libraries | ||
library(cluster) | ||
library(factoextra) | ||
library(RColorBrewer) | ||
|
||
dataset <- read.csv(file = "./data/bombay_queries.csv", header = TRUE, sep = "\t") | ||
|
||
distMat <- readDistMat("./data/bombay_aligon.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_bombay_Aligon.pdf") | ||
|
||
distMat <- readDistMat("./data/bombay_aligon_regularization.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_bombay_Aligon_regularization.pdf") | ||
|
||
dataset <- read.csv(file = "./data/ub_queries.csv", header = TRUE, sep = "\t") | ||
|
||
distMat <- readDistMat("./data/ub_aligon.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_ub_Aligon.pdf") | ||
|
||
distMat <- readDistMat("./data/ub_aligon_regularization.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_ub_Aligon_regularization.pdf") | ||
|
||
dataset <- read.csv(file = "./data/googleplus_queries.csv", header = TRUE, sep = "\t") | ||
|
||
distMat <- readDistMat("./data/googleplus_aligon.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_googleplus_Aligon.pdf") | ||
|
||
distMat <- readDistMat("./data/googleplus_aligon_regularization.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_googleplus_Aligon_regularization.pdf") | ||
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.pdf", height = 5) | ||
|
||
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.pdf", height = 5) | ||
|
||
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.pdf", height = 5) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
# set working directory | ||
#setwd("~/Downloads/EttuBench") | ||
|
||
# load two files evaluation.R and utils.R | ||
source(file = "./evaluation.R") | ||
source(file = "./utils.R") | ||
|
||
# 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.pdf") | ||
|
||
ggplot(data = comparison, aes(x = metric, y = beta_cv, 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_betacv.pdf") | ||
|
||
ggplot(data = comparison, aes(x = metric, y = dunn, 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_dunn.pdf") | ||
library(cluster) | ||
library(factoextra) | ||
library(RColorBrewer) | ||
|
||
dataset <- read.csv(file = "./data/bombay_queries.csv", header = TRUE, sep = "\t") | ||
|
||
distMat <- readDistMat("./data/bombay_aligon.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_bombay_Aligon.pdf") | ||
|
||
distMat <- readDistMat("./data/bombay_aligon_regularization.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_bombay_Aligon_regularization.pdf") | ||
|
||
dataset <- read.csv(file = "./data/ub_queries.csv", header = TRUE, sep = "\t") | ||
|
||
distMat <- readDistMat("./data/ub_aligon.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_ub_Aligon.pdf") | ||
|
||
distMat <- readDistMat("./data/ub_aligon_regularization.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_ub_Aligon_regularization.pdf") | ||
|
||
dataset <- read.csv(file = "./data/googleplus_queries.csv", header = TRUE, sep = "\t") | ||
|
||
distMat <- readDistMat("./data/googleplus_aligon.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_googleplus_Aligon.pdf") | ||
|
||
distMat <- readDistMat("./data/googleplus_aligon_regularization.csv") | ||
silhouettePlot(distMat, dataset$label, "./figure/sil_googleplus_Aligon_regularization.pdf") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters