add multiple folders to organize results
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# Libraries
|
||||
library(ggplot2)
|
||||
library(matrixStats)
|
||||
convergence <- read.csv(file.choose(), header=FALSE, row.names=1, skip=1)
|
||||
|
||||
sds <- rowSds(sapply(convergence[,-1], `length<-`, max(lengths(convergence[,-1]))), na.rm=TRUE)
|
||||
men <- rowMeans(sapply(convergence[,-1], `length<-`, max(lengths(convergence[,-1]))), na.rm=TRUE)
|
||||
print(sds)
|
||||
|
||||
# create data frame
|
||||
data <- data.frame(
|
||||
names=rownames(convergence),
|
||||
means=men,
|
||||
sds=sds
|
||||
)
|
||||
|
||||
convergence$group <- row.names(convergence)
|
||||
convergence.m <- melt(convergence, id.vars = "groups")
|
||||
|
||||
ggplot(data) +
|
||||
geom_bar(aes(x=names, y=means, fill=means), stat="identity", colour="black", alpha=0.8) +
|
||||
geom_errorbar( aes(x=names, ymin=means, ymax=means+sds), width=0.4, colour="black", alpha=0.8, size=0.6) +
|
||||
# ylim(0,104000) +
|
||||
xlab("Epsilon") + ylab("Ø Episoden bis Konvergenz") +
|
||||
theme_bw(base_size = 24)
|
||||
@@ -0,0 +1,56 @@
|
||||
# Libraries
|
||||
library(ggplot2)
|
||||
library(matrixStats)
|
||||
ta <- as.matrix(read.table(file.choose(), sep=",", header = FALSE))
|
||||
ta <- t(ta)
|
||||
dim(ta)
|
||||
head(ta)
|
||||
|
||||
# Create data frame
|
||||
data <- data.frame(
|
||||
y=ta[,1],
|
||||
y2=ta[,2],
|
||||
y3=ta[,3],
|
||||
y4=ta[,4],
|
||||
y5=ta[,5],
|
||||
y6=ta[,6],
|
||||
y7=ta[,7],
|
||||
y8=ta[,8],
|
||||
y9=ta[,9],
|
||||
y10=ta[,10],
|
||||
y11=ta[,11],
|
||||
y12=ta[,12],
|
||||
y13=ta[,13],
|
||||
y14=ta[,14],
|
||||
y15=ta[,15],
|
||||
x=seq(1, length(ta[,1]))
|
||||
)
|
||||
ggplot(data, aes(x*1000)) +
|
||||
labs( x ="Zeitstempel", y = "Ø Belohnung pro Zeitstempel", color = "Lernrate") +
|
||||
ylim(-1.5,0.6) +
|
||||
geom_line(aes(y = y, colour = "0.1"), size=1)+
|
||||
geom_line(aes(y = y2, colour = "0.3"), size=1) +
|
||||
geom_line(aes(y = y3, colour = "0.5"), size=1) +
|
||||
geom_line(aes(y = y4, colour = "0.7"), size=1) +
|
||||
geom_line(aes(y = y5, colour = "0.9"), size=1) +
|
||||
theme_bw(base_size = 24)
|
||||
|
||||
ggplot(data, aes(x*1000)) +
|
||||
labs(x ="Zeitstempel", y = "Ø Belohnung pro Zeitstempel", color = "Lernrate") +
|
||||
ylim(-1.5,0.6) +
|
||||
geom_line(aes(y = y6, colour = "0.1"), size=1) +
|
||||
geom_line(aes(y = y7, colour = "0.3"), size=1) +
|
||||
geom_line(aes(y = y8, colour = "0.5"), size=1) +
|
||||
geom_line(aes(y = y9, colour = "0.7"), size=1) +
|
||||
geom_line(aes(y = y10, colour = "0.9"), size=1) +
|
||||
theme_bw(base_size = 24)
|
||||
|
||||
ggplot(data, aes(x*1000) ) +
|
||||
labs(x ="Zeitstempel", y = "Ø Belohnung pro Zeitstempel", color = "Lernrate") +
|
||||
ylim(-1.5,0.6) +
|
||||
geom_line(aes(y = y11, colour = "0.1"), size=1) +
|
||||
geom_line(aes(y = y12, colour = "0.3"), size=1) +
|
||||
geom_line(aes(y = y13, colour = "0.5"), size=1) +
|
||||
geom_line(aes(y = y14, colour = "0.7"), size=1) +
|
||||
geom_line(aes(y = y15, colour = "0.9"), size=1) +
|
||||
theme_bw(base_size = 24)
|
||||
@@ -0,0 +1,34 @@
|
||||
# Libraries
|
||||
library(ggplot2)
|
||||
library(matrixStats)
|
||||
ta <- as.matrix(read.table(file.choose(), sep=",", header = FALSE, skip = 1))
|
||||
ta <- t(ta)
|
||||
dim(ta)
|
||||
head(ta)
|
||||
|
||||
# Create data frame
|
||||
data <- data.frame(
|
||||
y=ta[1:20,1],
|
||||
y2=ta[1:20,2],
|
||||
y3=ta[1:20,3],
|
||||
y4=ta[1:20,4],
|
||||
y5=ta[1:20,5],
|
||||
y6=ta[1:20,6],
|
||||
y7=ta[1:20,7],
|
||||
y8=ta[1:20,8],
|
||||
x=seq(1, length(ta[1:20,1]))
|
||||
)
|
||||
ggplot(data, aes(x*1000)) +
|
||||
labs( x ="Gesamtanzahl gesammeltes Futter", y = "Ø Zeitstempel pro Futter (log)", color = "Diskontierungsfaktor") +
|
||||
#scale_y_log10()+
|
||||
geom_hline(yintercept=23, linetype="dashed")+
|
||||
geom_text(aes(0,23,label = "opt", vjust = -1)) +
|
||||
geom_line(aes(y = y, colour = "0.05"), size=1)+
|
||||
geom_line(aes(y = y2, colour = "0.1"), size=1) +
|
||||
geom_line(aes(y = y3, colour = "0.3"), size=1) +
|
||||
geom_line(aes(y = y4, colour = "0.5"), size=1) +
|
||||
geom_line(aes(y = y5, colour = "0.7"), size=1)+
|
||||
geom_line(aes(y = y6, colour = "0.9"), size=1) +
|
||||
geom_line(aes(y = y7, colour = "0.95"), size=1) +
|
||||
geom_line(aes(y = y8, colour = "0.99"), size=1) +
|
||||
theme_bw(base_size = 24)
|
||||
@@ -0,0 +1,34 @@
|
||||
# Libraries
|
||||
library(ggplot2)
|
||||
library(matrixStats)
|
||||
ta <- as.matrix(read.table(file.choose(), sep=",", header = FALSE, skip = 1))
|
||||
ta <- t(ta)
|
||||
dim(ta)
|
||||
head(ta)
|
||||
|
||||
# Create data frame
|
||||
data <- data.frame(
|
||||
y=ta[,1],
|
||||
y2=ta[,2],
|
||||
y3=ta[,3],
|
||||
y4=ta[,4],
|
||||
y5=ta[,5],
|
||||
y6=ta[,6],
|
||||
y7=ta[,7],
|
||||
y8=ta[,8],
|
||||
x=seq(1, length(ta[,1]))
|
||||
)
|
||||
ggplot(data, aes(x*1000)) +
|
||||
labs( x ="Gesammeltes Futter", y = "Zeitstempel insgesamt", color = "Diskontierungsfaktor") +
|
||||
#geom_hline(yintercept=23, linetype="dashed")+
|
||||
geom_text(aes(20000,40000,label = "opt. Verhalten", vjust = -1)) +
|
||||
geom_line(aes(y = x*1000*23), size=1)+
|
||||
geom_line(aes(y = y, colour = "0.05"), size=1)+
|
||||
geom_line(aes(y = y2, colour = "0.1"), size=1) +
|
||||
geom_line(aes(y = y3, colour = "0.3"), size=1) +
|
||||
geom_line(aes(y = y4, colour = "0.5"), size=1) +
|
||||
geom_line(aes(y = y5, colour = "0.7"), size=1)+
|
||||
geom_line(aes(y = y6, colour = "0.9"), size=1) +
|
||||
geom_line(aes(y = y7, colour = "0.95"), size=1) +
|
||||
geom_line(aes(y = y8, colour = "0.99"), size=1) +
|
||||
theme_bw(base_size = 24)
|
||||
Reference in New Issue
Block a user