Description Usage Arguments Details Examples
Create node's information (name, parents, probabilities and states).
1 | createNodeInfo(nodes, prob, states)
|
nodes |
node with its parents |
prob |
list of node's probabilities |
states |
list of node's states |
Function runtime in core i5, 16GB of memory computer: 0.04s [see the example below]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | node.a = createNodeInfo(~asia, prob=c(0.01, 0.99), states=c("yes","no"))
node.a
node.t = createNodeInfo(~tub|asia, prob=c(0.05, 0.95, 0.01, 0.99),states=c("yes","no"))
node.t
node.s = createNodeInfo(~smoke, prob=c(0.5,0.5), states=c("yes","no"))
node.s
node.l = createNodeInfo(~lung|smoke, prob=c(0.1, 0.9, 0.01, 0.99), states=c("yes","no"))
node.l
node.b = createNodeInfo(~bronc|smoke, prob=c(0.6, 0.4, 0.3, 0.7), states=c("yes","no"))
node.b
node.e = createNodeInfo(~either|lung:tub,prob=c(1,0,1,0,1,0,0,1),states=c("yes","no"))
node.e
node.x = createNodeInfo(~xray|either, prob=c(0.98, 0.02, 0.05, 0.95), states=c("yes","no"))
node.x
node.d = createNodeInfo(~dysp|bronc:either, prob=c(0.9, 0.1, 0.7, 0.3, 0.8, 0.2, 0.1, 0.9), states=c("yes", "no"))
node.d
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.