MakePnet.NeticaBN | R Documentation |
This does the actual work of making a Pnet from the manifest
description. It is typically called from
WarehouseMake
.
MakePnet.NeticaBN(sess, name, data, restoreOnly=FALSE)
sess |
The Netica session ( |
name |
A character scalar with the name of the network. This
should follow the |
data |
A list providing data and metadata about the network. See details. |
restoreOnly |
A logical flag. If true, will signal an error if the network file does not exist. If false, a new empty network will be created. |
This is a key piece of the Warehouse
infrastructure. The idea is that a network can be constructed given a
session, a name, and a collection of metadata. The metadata can be
stored in a table which is the the manifest of the warehouse.
The current system expects the following fields in the data
argument.
For a network which represents an evidence model (spoke), this is the name of the network to which it should be attached (the hub).
This is a longer unconstrained name for the network.
This is the location in which the .neta
or
.dne
file which stores the network.
This is a longer string describing the network.
These correspond to fields in the RNetica{NeticaBN}
object.
An object of class NeticaBN
which is also in the
Pnet
abtract class.
The truename system is designed to implement the name restrictions
inherent in Netica (see IDname) without imposing the
same limits on the Peanut framework. This is done by adding a
Truename
field to the net object and then mangling the actual
name to follow the Netica rules using the
as.IDname
function.
The object should be available from the warehouse via its truename, but it is best to stick to the Netica naming conventions for networks and nodes.
There seem to be two use cases for this function (and
WarehouseSupply
from which it is called. During
model construction, calling this function should create a new blank
network. During scoring, it should load a prebuilt network and signal
an error if the network is missing. The restoreOnly
flag is
designed to distinguish between these cases.
Russell Almond
RNetica Package:
CreateNetwork
,
NeticaBN
,
IDname
Peanut Package:
Warehouse
, WarehouseMake
PNetica Pacakge
BNWarehouse
sess <- NeticaSession()
startSession(sess)
anet <- MakePnet.NeticaBN(sess,"Anet",
list(Title="A Network",Hub="",
Description="A Sample Network."))
DeleteNetwork(anet)
netman1 <- read.csv(system.file("auxdata", "Mini-PP-Nets.csv",
package="Peanut"),
row.names=1, stringsAsFactors=FALSE)
## Build the first network (proficiency model)
miniPP <- MakePnet.NeticaBN(sess,"miniPP",netman1[1,,drop=FALSE])
DeleteNetwork(miniPP)
stopSession(sess)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.