-
Notifications
You must be signed in to change notification settings - Fork 4
/
Visualize_Model_Accuracy.R
32 lines (23 loc) · 1.09 KB
/
Visualize_Model_Accuracy.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
31
32
library(reshape2)
library(ggplot2)
Lipify <- read.csv("Project_Insights/Project_Accuracy.csv", header = TRUE)
# Test Accuracy Graph:
ggplot(Lipify, aes(x = Category, y=Test.Accuracy)) +
geom_bar(stat = "identity",aes(fill = Test.Accuracy)) +
ylim(0, 100) +
ylab("Test Accuracy")+
theme(axis.text=element_text(size=14),
axis.title=element_text(size=16,face="bold"))
# Train Accuracy Graph:
ggplot(Lipify, aes(x = Category, y=Train.Accuracy)) +
geom_bar(stat = "identity",aes(fill = Train.Accuracy)) +
ylim(0, 100) +
ylab("Train Accuracy")+
theme(axis.text=element_text(size=14),
axis.title=element_text(size=16,face="bold"))
Lipify <- melt(Lipify, id.vars='Category')
ggplot(Lipify, aes(Category, value)) +
geom_bar(aes(fill = variable), width = 0.5,position = position_dodge(width = 0.5), stat="identity") +
theme(legend.position="top", legend.title = element_blank()) + ylab("Model Accuracy") +
theme(axis.text=element_text(size=14), axis.title=element_text(size=16,face="bold")) +
geom_text(aes(label=value) , position = position_dodge2(width = 0.5), vjust = -0.5)