Changes to accomodate variable layer numbers
This commit is contained in:
8
app.R
8
app.R
@@ -337,8 +337,8 @@ server <- function(input, output, session) {
|
|||||||
|
|
||||||
means <- apply(sampleDists, 2, mean)
|
means <- apply(sampleDists, 2, mean)
|
||||||
stdDev <- apply(sampleDists, 2, sd)
|
stdDev <- apply(sampleDists, 2, sd)
|
||||||
|
#quantiles <- t(apply(sampleDists, 2, quantile, c(0.01, 0.25, 0.5, 0.75, 0.99)))
|
||||||
quantiles <- t(apply(sampleDists, 2, quantile, c(0.01, 0.25, 0.5, 0.75, 0.99)))
|
quantiles <- t(apply(sampleDists, 2, quantile, c(0.01, 0.25, 0.5, 0.75, 0.99)))
|
||||||
|
|
||||||
print(paste("Building likelihoods from model, sample dists", length(thisModel$p_es$nodes$name), length(sampleDists)))
|
print(paste("Building likelihoods from model, sample dists", length(thisModel$p_es$nodes$name), length(sampleDists)))
|
||||||
#str(quantiles)
|
#str(quantiles)
|
||||||
|
|
||||||
@@ -571,17 +571,15 @@ server <- function(input, output, session) {
|
|||||||
edgeNet <- edges
|
edgeNet <- edges
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print(paste(nrow(model$legend), length(palette)))
|
||||||
|
|
||||||
legendDF <- data.frame(
|
legendDF <- data.frame(
|
||||||
id = 1:nrow(model$legend),
|
id = 1:nrow(model$legend),
|
||||||
label = model$legend,
|
label = model$legend,
|
||||||
color = palette,
|
color = palette[1:nrow(model$legend)],
|
||||||
stringsAsFactors = FALSE
|
stringsAsFactors = FALSE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
visNetwork(nodeNet, edgeNet, width = "100%", main = "Bayesian Belief Network", submain = input$modelSelect) %>%
|
visNetwork(nodeNet, edgeNet, width = "100%", main = "Bayesian Belief Network", submain = input$modelSelect) %>%
|
||||||
visExport() %>%
|
visExport() %>%
|
||||||
visLegend(useGroups = FALSE, addNodes = legendDF) %>%
|
visLegend(useGroups = FALSE, addNodes = legendDF) %>%
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user