FRemoved a bunch of prints, str's and cats
This commit is contained in:
8
Parses.R
8
Parses.R
@@ -57,10 +57,13 @@ parseScenario <- function(press, prefix = "p") {
|
||||
ncol = 3,
|
||||
dimnames = list(NULL, c("growth", "confidence", "layer"))
|
||||
)
|
||||
|
||||
for (col in 2:ncol(press)) {
|
||||
coefs[col - 1, ] <- as.numeric(split(press[1, col]))[match(c("growth", "confidence", "layer"), states)]
|
||||
}
|
||||
|
||||
press[is.na(press)] <- 0
|
||||
|
||||
if (sum(duplicated(pressNames)) > 0) {
|
||||
cat("Duplicated pressure node names found")
|
||||
print(pressNodes[duplicated(pressNames)])
|
||||
@@ -145,13 +148,12 @@ buildGraph <- function(model, desc) {
|
||||
c(model$nodes$growth[nodeRef], model$edges$values[rows]),
|
||||
c("(Intercept)", model$edges$input[rows])
|
||||
)
|
||||
# str(coefVal)
|
||||
|
||||
outDist[[idx]] <- list(coef = coefVal, sd = model$nodes$confidence[nodeRef])
|
||||
}
|
||||
|
||||
print("Saving model prior to network modelling")
|
||||
modelDefn <- paste0(inputText, edges)
|
||||
# save(modelDefn, file = "buildGraph.RData")
|
||||
|
||||
net <- model2network(paste0(inputText, edges), debug = FALSE)
|
||||
|
||||
@@ -169,7 +171,7 @@ buildGraph <- function(model, desc) {
|
||||
|
||||
cfit <- custom.fit(net, allDists)
|
||||
|
||||
cat("about to calculate sample distributions")
|
||||
print("about to calculate sample distributions")
|
||||
|
||||
sampleDists <- cpdist(cfit, nodes = outNodes, evidence = TRUE, n = 10000, method = "lw")
|
||||
summDists <- summary(sampleDists)
|
||||
|
||||
Reference in New Issue
Block a user