MakePnet.NeticaBN {PNetica}R Documentation

Creates a NeticaBN object which is also a Pnet

Description

This does the actual work of making a Pnet from the manifest description. It is typically called from WarehouseMake.

Usage

MakePnet.NeticaBN(sess, name, data)

Arguments

sess

The Netica session (NeticaSession) object in which the net will be created.

name

A character scalar with the name of the network. This should follow the IDname rules.

data

A list providing data and metadata about the network. See details.

Details

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.

Hub

For a network which represents an evidence model (spoke), this is the name of the network to which it should be attached (the hub).

Title

This is a longer unconstrained name for the network.

Pathname

This is the location in which the .neta or .dne file which stores the network.

Description

This is a longer string describing the network.

These correspond to fields in the RNetica{NeticaBN} object.

Value

An object of class NeticaBN which is also in the Pnet abtract class.

Names and Truenames

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.

Author(s)

Russell Almond

See Also

RNetica Package: CreateNetwork, NeticaBN, IDname

Peanut Package: Warehouse, WarehouseMake

PNetica Pacakge BNWarehouse

Examples


sess <- NeticaSession()
startSession(sess)

anet <- MakePnet.NeticaBN(sess,"Anet",
                          list(Title="A Network",Hub="",
                               Description="A Sample Network."))

DeleteNetwork(anet)

netman1 <- read.csv(paste(library(help="Peanut")$path, "auxdata",
                          "Mini-PP-Nets.csv", sep=.Platform$file.sep),
                    row.names=1, stringsAsFactors=FALSE)
## Build the first network (proficiency model)
miniPP <- MakePnet.NeticaBN(sess,"miniPP",netman1[1,,drop=FALSE])

DeleteNetwork(miniPP)
stopSession(sess)


[Package PNetica version 0.8-5 Index]