###########################################################
## Network Construction:
sess <- NeticaSession()
startSession(sess)
#> Netica 6.07 Linux (AFCl64), (C) 1992-2019 Norsys Software Corp.
#>
#> Netica is operating without a password; there are some limitations.
abc <- CreateNetwork("ABC", session=sess)
A <- NewDiscreteNode(abc,"A",c("A1","A2","A3","A4"))
B <- NewDiscreteNode(abc,"B",c("B1","B2","B3"))
C <- NewDiscreteNode(abc,"C",c("C1","C2"))
AddLink(A,B)
NodeParents(C) <- list(A,B)
NodeProbs(A)<-c(.1,.2,.3,.4)
NodeProbs(B) <- normalize(matrix(1:12,4,3))
NodeProbs(C) <- normalize(array(1:24,c(4,3,2)))
#> Warning in as.CPA(cpt): Array being coerced to CPA does not have dimnames.
#> Warning in as.CPA(cpt): Array being coerced to CPA does not have
#> names(dimnames).
abcFile <- tempfile("peanut",fileext=".dne")
WriteNetworks(abc,abcFile)
DeleteNetwork(abc)