Description Usage Arguments Details Value Note Examples
This function loads the Bayesian network from a native gRain object of class grain or an external
file with extension .net (as provided by external softwares Hugin or GeNIe),
optionally compiling the network.
1 | loadNetwork(network, target = NULL)
|
network |
The Bayesian network. An object of class |
target |
character. The node of interest to be modelled and mapped. |
Bayesian networks built with the package bnlearn can be imported with the function bnlearn::as.grain, which converts them into grain objects.
.net file format as provided from Netica 5.24 currently does not correspond to a valid Hugin .net file.
Argument target has default set to NULL, but if provided the network will be compiled for faster querying.
An object of class grain. The Bayesian network. If target argument is provided the network is compiled for a faster querying .
Under current release, this function wraps a set of hidden functions copied in block from the gRain package, as current CRAN policy discourages accessing hidden functions with the ":::" operator. These functions will be progressively substituted by bnspatial native ones.
1 2 3 4 5 6 | ## Load from external file (.net format)
raw = system.file("extdata/LandUseChange.net", package = "bnspatial")
loadNetwork(raw)
## Compile using target node
loadNetwork(raw, 'FinalLULC')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.