| Pnet.NeticaBN | R Documentation |
"NeticaBN" as a "Pnet"The PNetica package supplies the needed methods so that the
RNetica::NeticaBN object is an instance of the
Peanut::Pnet object.
See NeticaBN for a description of the Netica class.
With these methods, NeticaBN now extends
Pnet.
All reference classes extend and inherit methods from
"envRefClass".
signature(net =
"NeticaBN"): Compiles the network.
signature(net = NeticaBN):
Gets the name of the network.
signature(net = NeticaBN):
Sets the name of the network.
signature(net = NeticaBN):
Gets the title of the network.
signature(net = NeticaBN):
Sets the title of the network.
signature(net =
NeticaBN): Gets the description of the network.
(signature(net =
NeticaBN): Sets the description of the network.
signature(net = NeticaBN):
Gets the pathname where the network is stored.
signature(net =
NeticaBN): Sets the pathname where the network is stored.
signature(net = NeticaBN):
Returns the name of the hub (competency/proficiency model)
associated with an spoke (evidence model) network.
signature(net = NeticaBN):
Sets the name of the hub.
signature(net = NeticaNode):
Returns the default prior weight
associated with nodes in this network.
signature(net = NeticaNode):
Sets the default prior weight
associated with nodes in this network.
signature(x = NeticaBN):
Forces x to be a Pnet.
signature(x = NeticaBN):
Returns true.
Russell Almond
Base class: NeticaBN.
Mixin class: Pnet.
Methods (from Peanut package.):
PnetCompile,
PnetHub,
PnetName,
PnetTitle,
PnetDescription,
PnetPathname,
as.Pnet,
is.Pnet.
sess <- NeticaSession()
startSession(sess)
curd <- setwd(system.file("testnets",package="PNetica"))
## PnetHub
PM <- ReadNetworks("miniPP-CM.dne", session=sess)
stopifnot(PnetHub(PM)=="")
EM1 <- ReadNetworks("PPcompEM.dne", session=sess)
stopifnot(PnetHub(EM1)=="miniPP_CM")
foo <- CreateNetwork("foo",sess)
stopifnot(is.na(PnetHub(foo)))
PnetHub(foo) <- PnetName(PM)
stopifnot(PnetHub(foo)=="miniPP_CM")
## PnetCompile
PnetCompile(PM)
marginPhysics <- Statistic("PnodeMargin","Physics","Pr(Physics)")
calcStat(marginPhysics,PM)
net <- CreateNetwork("funNet",sess)
stopifnot(PnetName(net)=="funNet")
PnetName(net)<-"SomethingElse"
stopifnot(PnetName(net)=="SomethingElse")
## PnetPathname
stopifnot(PnetPathname(PM)=="miniPP-CM.dne")
PnetPathname(PM) <- "StudentModel1.dne"
stopifnot(PnetPathname(PM)=="StudentModel1.dne")
##PnetTitle and PnetDescirption
firstNet <- CreateNetwork("firstNet",sess)
PnetTitle(firstNet) <- "My First Bayesian Network"
stopifnot(PnetTitle(firstNet)=="My First Bayesian Network")
now <- date()
PnetDescription(firstNet)<-c("Network created on",now)
## Print here escapes the newline, so is harder to read
cat(PnetDescription(firstNet),"\n")
stopifnot(PnetDescription(firstNet) ==
paste(c("Network created on",now),collapse="\n"))
DeleteNetwork(list(PM,EM1,foo,net,firstNet))
stopSession(sess)
setwd(curd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.