library(readr)
v<- read_csv("~/Proposed papers/Animal Science/validation.csv")
## Parsed with column specification:
## cols(
## hiden = col_double(),
## matric = col_double(),
## data_set = col_character(),
## class = col_character()
## )
#View(validation)
attach(v)
names(v)
## [1] "hiden" "matric" "data_set" "class"
data_set=as.factor(data_set)
class=as.factor(class)
library(ggplot2)
library(patchwork) ## new package for displaying plots
p <- ggplot(data = v,
aes(x=hiden, y=matric,shape=class))+
geom_point(size=3)+ylab("Accuracy") + geom_line(shape=class,color="black",aes(linetype=class))+
xlab("Hidden Layers")+ theme_classic(base_size = 14)+ theme(axis.text.x = element_text(face="bold", color="black",
size=10),
axis.text.y = element_text(face="bold", color="black",
size=10))+
theme_bw()+facet_wrap(.~data_set)
## Warning: Ignoring unknown parameters: shape
p

p <- ggplot(data = v,
aes(x=hiden, y=matric,shape=data_set,color=class))+
geom_point(size=3)+ylab("Accuracy") + geom_line(shape=data_set,color="black",aes(linetype=data_set))+
xlab("Hidden Layers")+ theme_classic(base_size = 14)+ theme(axis.text.x = element_text(face="bold", color="black",
size=10),
axis.text.y = element_text(face="bold", color="black",
size=10))
## Warning: Ignoring unknown parameters: shape
p

acc=subset(v,class=="accuracy")
mis=subset(v,class=="misclassification")
a <- ggplot(data = acc,
aes(x=hiden, y=matric,shape=data_set))+
geom_point(size=3)+ylab("Accuracy") + geom_line(shape=data_set,color="black",aes(linetype=data_set))+
xlab("Hidden Layers")+ theme_classic(base_size = 14)+ theme(axis.text.x = element_text(face="bold", color="black",
size=10),
axis.text.y = element_text(face="bold", color="black",
size=10))+theme_bw()
## Warning: Ignoring unknown parameters: shape
a

b <- ggplot(data =mis,
aes(x=hiden, y=matric,shape=data_set))+
geom_point(size=3)+ylab("Misclassification") + geom_line(shape=data_set,color="black",aes(linetype=data_set))+
xlab("Hidden Layers")+ theme_classic(base_size = 14)+ theme(axis.text.x = element_text(face="bold", color="black",
size=10),
axis.text.y = element_text(face="bold", color="black",
size=10))+theme_bw()
## Warning: Ignoring unknown parameters: shape
b

(a)/(b)

All algorithms cross validation plots
library(readr)
v<- read_csv("~/Proposed papers/Animal Science/all_algo.csv")
## Parsed with column specification:
## cols(
## vali = col_double(),
## algorithm = col_character(),
## accuracy = col_double(),
## kappa = col_double()
## )
attach(v)
names(v)
## [1] "vali" "algorithm" "accuracy" "kappa"
algorithm=as.factor(algorithm)
Accuracy of all algorithms as the cross validation approaches 100%
a <- ggplot(data = v,
aes(x=vali, y=accuracy,shape=algorithm))+
geom_point(size=3)+ylab("Accuracy") + geom_line(shape=algorithm,color="black",aes(linetype=algorithm))+
xlab("Cross-validation size")+
theme(axis.text.x = element_text(face="bold", color="black",
size=114),
axis.text.y = element_text(face="bold", color="black",
size=14))+
theme( axis.line = element_line(colour = "black",
size = 0.8, linetype = "solid"))+theme_classic()
## Warning: Ignoring unknown parameters: shape
a
## Warning: The shape palette can deal with a maximum of 6 discrete values because
## more than 6 becomes difficult to discriminate; you have 10. Consider
## specifying shapes manually if you must have them.
## Warning: Removed 40 rows containing missing values (geom_point).

Kappa statistic of all algorithms as the cross validation approaches 100%
b <- ggplot(data = v,
aes(x=vali, y=kappa,shape=algorithm))+
geom_point(size=3)+ylab("Cohen’s Kappa Statistic") + geom_line(shape=algorithm,color="black",aes(linetype=algorithm))+
xlab("Cross-validation size")+
theme(axis.text.x = element_text(face="bold", color="black",
size=14),
axis.text.y = element_text(face="bold", color="black",
size=14))+
theme( axis.line = element_line(colour = "black",
size = 0.8, linetype = "solid"))+theme_classic()
## Warning: Ignoring unknown parameters: shape
b
## Warning: The shape palette can deal with a maximum of 6 discrete values because
## more than 6 becomes difficult to discriminate; you have 10. Consider
## specifying shapes manually if you must have them.
## Warning: Removed 40 rows containing missing values (geom_point).
