API Documentation - lhope/cl-bayesnet GitHub Wiki
A Common Lisp Bayesian Network Inference Engine
Sets the evidence in a node via state index or symbol. For a net or join-tree, adds the evidence as a plist of node-state pairs.
Clear all evidence from object.
Returns the evidence in a node as its state symbol (nil if no evidence), and for nets and join-trees a plist of node-state pairs. Settable.
Sets the evidence in a node via state index or symbol. For a net or join-tree, sets the evidence as either a plist of node-state pairs, or a vector of state indices (or -1 for unobserved) corresponding to the net's node-order.
Returns the evidence in a node as a state index and nets as a vector of state indices. -1 indicates no evidence.
Load a file in ace file format. Returns a net.
Load a file in Netica's dne file format. Returns a net.
Load a file in xmlbif file format. Returns a net.
For a net, a string identifier and for a node, a keyword identifier.
Returns the containing net for a node or join-tree.
Retrieve the node represented by a keyword name or index from the given net or join-tree.
Returns a list of node-names as keywords. The ordering matches their index order. This is set as part of the network compilation process.
The amount of nodes in the network.
The amount of states for the given node.
A vector of parent names as keywords for the given node.
Queries a net or node object.node only - A probability vector for the states of node.
node and integer - The probability the node is in that numbered state (according to (states node)).
node and symbol - The probability the node is in that state.
node and list - A probability vector for the states of node given list, which is a plist of node-state pairs.
net only - The joint probability for the whole net.
net and vector - The joint probability for the whole net, given the vector. Vector has the num-nodes length, and contains either a state number for each node, or -1 if the node state is unknown.
net and symbol - A probability vector for the states of the node designated by symbol.
net and list - The joint probability for the whole net, given list, which is a plist of node-state pairs.
A vector of state names as keywords for the given node.
Writes out arithmetic circuit instructions to a c file, compiles it with gcc, loads the shared object, and prepares the net to use the loaded function. If source-location is specified, writes the c file there. Otherwise uses a temporary file.Returns the closure used, the raw cffi function pointer, and the number of instructions.
Use interpreted arithmetic circuit instructions for the net. Returns the instructions object.
Use a join-tree to evaluate this net. Returns the join-tree object.
Saves the existing evidence in the net and sets the evidence to evidence. Restores the net to its previous state after leaving the with-evidence block.
Saves the existing evidence in the net and sets the evidence to evidence. Restores the net to its previous state after leaving the with-evidence block.