BuildNetManifest {Peanut} | R Documentation |
A network manifest is a table of meta data about a colleciton of
networks. Each line corresponds to the specific network. This
manifest can be used by a network warehouse (Warehouse
)
to recreate the network on demand.
BuildNetManifest(Pnetlist)
Pnetlist |
A list of |
A network manifest is a table (data frame) which describes a collection
of networks. It contains meta-data about the networks, and not the
information about the nodes, contained in the node manifest
(BuildNodeManifest
) or the relaitonships between the
nodes which is contained in the Q-matrix
(Pnet2Qmat
) or the Ω-Matrix
(Pnet2Omega
). The role of the net
manifest is to be used as to create a Net Warehouse which is
an argument to the Qmat2Pnet
and
Omega2Pnet
commands, creating networks as they are
referenced.
The “Name” column of the table contains the network name and is
a key to the table (so it should be unique). It corresponds to
PnetName
. The “Title” (PnetTitle
)
and “Description” (PnetDescription
) columns contain
optional meta-data about the node. The “Pathname”
(PnetPathname
) column
contiains the location of the file to which the network should be
written and from which it can be read. The “Hub”
(PnetHub
) is for spoke models (evidence models) some of
whose variables are defined in a hub network. This the network in
question is meant to be a spoke, then this field points at the
corresponding hub.
An object of type data.frame
where the columns
have the following values.
Name |
A character value giving the name of the network. This
should be unique for each row and normally must conform to variable
naming conventions. Corresponds to the function |
Title |
An optional character value giving a longer human readable name
for the netowrk. Corresponds to the function |
Hub |
If this model is incomplete without being joined to another
network, then the name of the hub network. Otherwise an empty
character vector. Corresponds to the function |
Pathname |
The location of the file from which the network should
be read or to which it should be written. Corresponds to the function
|
Description |
An optional character value documenting the purpose
of the network. Corresponds to the function |
Note that the name column is regarded as a primary key to the table.
Russell Almond
Almond, R. G. (presented 2017, August). Tabular views of Bayesian networks. In John-Mark Agosta and Tomas Singlair (Chair), Bayeisan Modeling Application Workshop 2017. Symposium conducted at the meeting of Association for Uncertainty in Artificial Intelligence, Sydney, Australia. (International) Retrieved from http://bmaw2017.azurewebsites.net/
Network functions called to find network data:
PnetName
, PnetTitle
,
PnetPathname
, PnetHub
,
PnetDescription
Used in the construction of Network Warehouse
s (see
WarehouseManifest
).
Similar to the function BuildNodeManifest
.
## This provides an example network manifest. netman1 <- read.csv(paste(library(help="Peanut")$path, "auxdata", "Mini-PP-Nets.csv", sep=.Platform$file.sep), row.names=1, stringsAsFactors=FALSE) ## Not run: library(PNetica) ## Example requires PNetica sess <- NeticaSession() startSession(sess) setwd(file.path(library(help="PNetica")$path, "testnets")) Nets <- ReadNetworks(c("miniPP-CM.dne", "PPcompEM.dne", "PPconjEM.dne", "PPtwostepEM.dne"), session=sess) netman <- BuildNetManifest(Nets) stopifnot(all.equal(netman,netman1)) ## BNWarehouse is the PNetica Net Warehouse. Nethouse <- BNWarehouse(manifest=netman1,session=sess,key="Name") setwd(curd) stopSession(sess) ## End(Not run)