-
Notifications
You must be signed in to change notification settings - Fork 0
/
predictive_accuracy.Rmd
41 lines (35 loc) · 1.11 KB
/
predictive_accuracy.Rmd
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
33
34
35
36
37
38
39
---
title: "Comparative Study of Machine Learning Algorithms for Estrogen Receptor Status Prediction On Breast Cancer Metabolomics Data - Predictive Accuracy"
author: "Roshini Balasubramanian"
output:
html_document:
keep_md: true
---
```{r load AUC}
library(ggplot2)
AUC <- read.csv('AUC.csv',row.names = 1)
AUC_t <- as.data.frame(t(AUC))
wilcox.test(AUC_t[['dl']], AUC_t[['lda']], data = AUC_t)
```
```{r}
wilcox.test(AUC_t[['dl']], AUC_t[['cart']], data = AUC_t)
```
```{r}
wilcox.test(AUC_t[['dl']], AUC_t[['gbm']], data = AUC_t)
```
```{r plot AUC}
sd <- as.data.frame(matrix(ncol = 1, nrow = 6))
row.names(sd) <- row.names(AUC)
for (i in 1:nrow(AUC)){
sd[i,1] <- sd(AUC[i,])
}
AUC <- cbind(AUC, "mean" = rowMeans(AUC))
AUC <- cbind(AUC, "sd" = sd)
AUC$model <- row.names(AUC)
positions <- row.names(AUC %>% arrange(desc(mean)))
ggplot(data=AUC, aes(x = model, y=mean, fill = model)) +
scale_fill_brewer(palette="Dark2")+
theme_minimal()+
geom_col() + scale_x_discrete(limits = positions) +geom_errorbar(aes(ymin=mean-V1, ymax=mean+V1), width=.5) + labs(title="AUC",
x ="Model", y = "Mean")
```