32.2. Netica Interface

This is an interface to the Netica C API for working with Bayesian belief networks and influence diagrams.

The package NETICA is case-sensitive, e.g., you would write (netica:GetNodeExpectedUtils_bn ...) when you need to call GetNodeExpectedUtils_bn.

An interface to all public C functions is provided. Additionally, some higher level functionality is available (see modules/netica/demo.lisp for sample usage):

(netica:start-netica &KEY :license :verbose)
Call NewNeticaEnviron_ns and InitNetica_bn and print some statistics; initialize netica:*env*.
(netica:check-errors &KEY :env :clear :severity)
Show and, optionally, clear (ClearError_ns), the errors of the given severity (ErrorSeverity_ns) and above. You should call this function after every call to a Netica function. Every wrapper function in this list calls it, so you do not need to call it after a call to a wrapper function.
(netica:error-message error)

Convert netica error to a STRING containing

ErrorCategory_ns
ErrorSeverity_ns
ErrorNumber_ns
ErrorMessage_ns
(netica:close-netica &KEY :env :verbose)
Terminate the netica session. Sets netica:*env* to NIL.
(netica:make-net &KEY :name :comment :title :env :verbose)
Call NewNet_bn, SetNetTitle_bn and SetNetComment_bn.
(netica:net-info net &KEY :out)

Print some information about the net:

GetNetName_bn
GetNetTitle_bn
GetNetComment_bn
GetNetFileName_bn
GetNetNodes_bn
(netica:make-node &KEY :name :net :kind :levels :states :num-states :title :comment :parents :cpt :x :y :env :verbose)
Call NewNode_bn with the given name and many other parameters.
(netica:node-info node &KEY :header :out)
Print some information about the node, preceded by the header.
(netica:get-beliefs node &KEY :env :verbose)
Call GetNodeBeliefs_bn on the node.
(netica:enter-finding net node state &KEY :env :verbose)
Call EnterFinding_bn using NodeNamed_bn and StateNamed_bn.
(netica:save-net net &KEY :file :env :verbose)
Call WriteNet_bn.
(netica:read-net file &KEY :env :verbose)
Call ReadNet_bn.
(netica:with-open-dne-file (var file &REST opts) &BODY body)
Call NewStreamFile_ns, execute body, then DeleteStream_ns - just like WITH-OPEN-STREAM.
netica:*verbose*
The log STREAM or NIL; the default value for the :VERBOSE argument (initially set to NIL).
netica:*license*
The license key provided by Norsys; the default value for the :LICENSE argument.
netica:*env*
The Netica environment object; the default value for the :ENV argument.

These notes document CLISP version 2.41Last modified: 2006-10-13