BNWarehouse | R Documentation |
BNWarehosue
class.This is the constructor for the BNWarehouse
class. This produces NeticaBN
objects, which
are instances of the Pnet
abstract class.
BNWarehouse(manifest = data.frame(), session = getDefaultSession(),
address = ".", key = c("Name"), prefix = "S")
manifest |
A data frame containing instructions for building the
nets. See |
session |
A link to a |
address |
A character scalar giving the path in which the “.dne” files containing the networks are stored. |
key |
A character scalar giving the name of the column in the manifest which contains the network name. |
prefix |
A character scaler used in front of numeric names to
make legal Netica names. (See |
An object of class BNWarehouse
.
Russell Almond
Warehouse
for the general warehouse protocol.
sess <- NeticaSession()
startSession(sess)
### This tests the manifest and factory protocols.
nodeman1 <- read.csv(system.file("auxdata", "Mini-PP-Nodes.csv",
package="Peanut"),
row.names=1,stringsAsFactors=FALSE)
netman1 <- read.csv(system.file("auxdata", "Mini-PP-Nets.csv",
package="Peanut"),
row.names=1, stringsAsFactors=FALSE)
### Test Net building
Nethouse <- BNWarehouse(manifest=netman1,session=sess,key="Name",
address=system.file("testnets",package="PNetica"))
CM <- WarehouseSupply(Nethouse,"miniPP_CM")
stopifnot(is.null(WarehouseFetch(Nethouse,"PPcompEM")))
EM1 <- WarehouseMake(Nethouse,"PPcompEM")
EMs <- lapply(c("PPcompEM","PPconjEM", "PPtwostepEM", "PPdurAttEM"),
function(nm) WarehouseSupply(Nethouse,nm))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.