fix burnin bug

This commit is contained in:
Hollos Roland 2021-04-19 16:24:21 +02:00
parent 6fe00f9e29
commit a4dfe19110
2 changed files with 3 additions and 4 deletions

View File

@ -52,7 +52,6 @@ multiSiteCalib <- function(measurements,
# | |___| | | __/ (_| | || __/ | |_| | | | | | __/ (_| | (_| \__ \
# \____|_| \___|\__,_|\__\___| \__|_| |_|_| \___|\__,_|\__,_|___/
copyToThreadDirs2(iniSource=calTable$site_id, numCores=numCores, execPath=execPath)
# ____ _ _ _
@ -69,7 +68,7 @@ multiSiteCalib <- function(measurements,
multiSiteThread(measuredData = measurements, parameters = parameters, calTable=calTable,
dataVar = dataVar, iterations = threadCount[i],
likelihood = likelihood, threadNumber= i)
likelihood = likelihood, threadNumber= i, burnin=burnin)
, error = function(e){
writeLines(as.character(iterations),"progress.txt")
})
@ -207,7 +206,7 @@ multiSiteThread <- function(measuredData, parameters = NULL, startDate = NULL,
dataVar, outLoc = "./calib",
outVars = NULL, iterations = 300,
skipSpinup = TRUE, plotName = "calib.jpg",
modifyOriginal=TRUE, likelihood, uncertainity = NULL,
modifyOriginal=TRUE, likelihood, uncertainity = NULL, burnin=NULL,
naVal = NULL, postProcString = NULL, threadNumber) {
originalRun <- list()

View File

@ -176,7 +176,7 @@ musoRand <- function(parameters, iterations=3000, fileType="epc", constrains = N
E <- do.call(rbind,lapply(Ef,function(x){x$E}))
f <- do.call(c,lapply(Ef,function(x){x$f}))
# browser()
randVal <- suppressWarnings(limSolve::xsample(G=G,H=h,E=E,F=f,burninlength=burnin, jiter = iterations))$X
randVal <- suppressWarnings(limSolve::xsample(G=G,H=h,E=E,F=f,burninlength=burnin, iter = iterations))$X
} else{
Gh0<-genMat0(dependences)
randVal <- suppressWarnings(xsample(G=Gh0$G,H=Gh0$h, iter = iterations))$X