-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuncleaned.Rmd
54 lines (43 loc) · 1.17 KB
/
uncleaned.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
```{r setup, include=FALSE}
knitr::opts_chunk$set(warning = FALSE, message = FALSE)
```
```{r}
library(readr)
library(dplyr)
library(ggplot2)
library(rjson)
library(gridExtra)
```
```{r}
uncleaned_history <- read_csv("model/uncleaned/history.csv")
```
```{r}
loss <- ggplot(data=uncleaned_history, aes(x=as.numeric(row.names(uncleaned_history)), y=loss)) +
geom_point() +
geom_line() +
ggtitle("Loss vs. Epoch") +
xlab("Epoch") +
ylab("Loss")
loss
```
```{r}
accuracy <- ggplot(data=uncleaned_history, aes(x=as.numeric(row.names(uncleaned_history)), y=binary_accuracy)) +
geom_point() +
geom_line() +
ggtitle("Accuracy vs. Epoch") +
xlab("Epoch") +
ylab("Accuracy")
accuracy
```
```{r}
grid.arrange(loss, accuracy, nrow=2, ncol=1)
```
```{r}
results <- fromJSON(file="model/uncleaned/results.json")
print(paste("Uncleaned Model Accuracy:", results["accuracy"]))
print(paste("Uncleaned Model Loss:", results["loss"]))
```
```{r}
ggsave(filename="model/uncleaned/plots/loss.png", plot=loss)
ggsave(filename="model/uncleaned/plots/accuracy.png", plot=accuracy)
```