diff --git a/07_final_assignment/.RData b/07_final_assignment/.RData index 2e578aa..eb9623d 100644 --- a/07_final_assignment/.RData +++ b/07_final_assignment/.RData Binary files differ diff --git a/07_final_assignment/baboonSimulation.R b/07_final_assignment/baboonSimulation.R index 8292008..9d3c343 100644 --- a/07_final_assignment/baboonSimulation.R +++ b/07_final_assignment/baboonSimulation.R @@ -345,18 +345,21 @@ # code for parallelizing the experiment. # Goal: Being able to run without a shared data structure -# and thus avoiding conflicts with critical sections +# and thus avoiding conflicts with critical sections. +# Solution: Reading and printing from and to different files +# for each thread (divide-and-conquer). Results need to be combined +# in the end. print.iterations <- FALSE #Note: Not meaningful for parallel execution, #see http://blog.revolutionanalytics.com/2015/02/monitoring-progress-of-a-foreach-parallel-job.html #for a discussion -num.cores <- 15 #Can NOT be changed without further code adjustment +num.cores <- 15 #Can NOT be changed without further code adjustment monkeys.per.core <- 8 #Can NOT be changed without further code adjustment start.of.a.and.b <- 0.001 #Can be changed with no further code adjustment -end.of.a.and.b <- 0.300 #Can be changed with no further code adjustment +end.of.a.and.b <- 0.300 #Can be changed with no further code adjustment debug <- FALSE @@ -528,9 +531,9 @@ conditions <- c("GeneralAccuracy", "WordAccuracy", "NonwordAccuracy") for(c in conditions) { - image.plot(x=sort(unique(aseq)), - y=sort(unique(aseq)), - z=get.matrix(data, "GeneralAccuracy", aseq), + image.plot(x=sort(aseq), + y=sort(aseq), + z=get.matrix(data, c, aseq), #z = mat1, #alternative while results are not here yet main=c, xlab="alpha",