diff --git a/RBBGCMuso/R/multiSite.R b/RBBGCMuso/R/multiSite.R index 1bfd904..1cd9be7 100644 --- a/RBBGCMuso/R/multiSite.R +++ b/RBBGCMuso/R/multiSite.R @@ -216,17 +216,16 @@ multiSiteCalib <- function(measurements, results <- (rbind(res0,resultsSans0)) write.csv(results,"result.csv") calibrationPar <- future::value(fut[[1]], stdout = FALSE, signal=FALSE)[["calibrationPar"]] - # notForTree <- c(seq(from = (length(calibrationPar)+1), length.out=3)) - # notForTree <- numeric(0) - # notForTree <- c(notForTree,which(sapply(seq_along(calibrationPar),function(i){sd(results[,i])==0}))) - # treeData <- results[,-notForTree] - # treeData["failType"] <- as.factor(results$failType) - # if(ncol(treeData) > 4){ - # rp <- rpart(failType ~ .,data=treeData,control=treeControl) - # svg("treeplot.svg") - # rpart.plot(rp) - # dev.off() - # } + notForTree <- c(seq(from = (length(calibrationPar)+1), length.out=3)) + notForTree <- c(notForTree,which(sapply(seq_along(calibrationPar),function(i){sd(results[,i])==0}))) + treeData <- results[,-notForTree] + treeData["failType"] <- as.factor(results$failType) + if(ncol(treeData) > 4){ + rp <- rpart(failType ~ .,data=treeData,control=treeControl) + svg("treeplot.svg") + rpart.plot(rp) + dev.off() + } origModOut <- future::value(fut[[1]], stdout = FALSE, signal=FALSE)[["origModOut"]] # Just single objective version TODO:Multiobjective results <- results[results[,"Const"] == 1,]