HAPI.Domain Class Module

Startpage
Overview
Index
HAPI
   |
   HAPI.Domain

Properties

AIC() [[As Double]] (R)
Returns the AIC score
ApproximationConstant() [[As Double]] (R)
Returns the sum of the probability of all possible configurations remaining when approximation is used (see Approximate).
BIC() [[As Double]] (R)
Returns the BIC score
CGEvidenceIsPropagated() [[As Boolean]] (R)
If evidence has been entered into a CG node and this has been propagated in the domain, this property is True.
CaseCount(lConfig As Long) [[As Single]] (RW)
Retrieve the case count associate with the case config in this domain.
ConcurrencyLevel() [[As Long]] (RW)
Specifies the lower limit on the size of the tasks to be performed by individual threads.
Conflict() [[As Double]] (R)
Holds the conflict value of the evidence propagated during the last call of Propagate.
DConnectedNodes(sourceNodes As Collection, hardNodes As Collection, softNodes As Collection) [[As Collection]] (R)
Performs a d-separation test and returns a list of d-connected nodes. Assuming evidence on the specified evidence nodes, this method returns the list of nodes that are d-connected to the specified list of source nodes.
DSeparatedNodes(sourceNodes As Collection, hardNodes As Collection, softNodes As Collection) [[As Collection]] (R)
Performs a d-separation test and returns a list of d-separated nodes. Assuming evidence on the specified evidence nodes, this method returns the list of nodes that are d-separated to the specified list of source nodes.
EliminationOrder() [[As Collection]] (R)
Holds the elimination order used during the last triangulation (see Triangulate and TriangulateWithOrder).
EquilibriumIs(lEq As hEquilibriums) [[As Boolean]] (R)
True, if this Domain has been propagated using the specified equilibrium.
EvidenceIsPropagated() [[As Boolean]] (R)
True, if evidence has been entered and has been propagated. Otherwise, False.
EvidenceModeIs(lEM As hEvidenceModes) [[As Boolean]] (R)
True, if all junction trees of the domain could have been propagated using the specified evidence mode (and if the entire domain could have been propagated with that evidence mode). Otherwise, False.
EvidenceToPropagate() [[As Boolean]] (R)
True, if evidence has been entered which has not been propagated. Otherwise, False. If you think about it, this is NOT just the same as (Not EvidenceIsPropagated).
ExpectedUtility() [[As Double]] (R)
Returns the calculated expected utility associated with a decision model (use Propagate to update probabilities and utilities).
GrainSize() [[As Long]] (RW)
Specifies the lower limit on the size of the tasks to be performed by individual threads.
HasUserAttribute(strKey As String) [[As Boolean]] (R)
Determines whether a user attribute is set on the Domain object.
IsCompiled() [[As Boolean]] (R)
True, if Domain has been compiled (see Compile). Otherwise, False.
IsCompressed() [[As Boolean]] (R)
True, if compression is used (see Compress). Otherwise, False.
IsTriangulated() [[As Boolean]] (R)
True, if Domain has been triangulated (see Triangulate). Otherwise, False.
JunctionTrees() [[As Collection]] (R)
Holds a collection of JunctionTree objects if the domain has been compiled (see the Compile method).
LikelihoodIsPropagated() [[As Boolean]] (R)
True if likelihood evidence (non-deterministic evidence) has been entered and propagated. Otherwise, False.
LogLikelihood() [[As Double]] (R)
Return the log-likelihood of the most recent propagation.
LogLikelihoodTolerance() [[As Double]] (RW)
Get current setting of the log-likelihood tolerance in this domain.
LogNormalizationConstant() [[As Double]] (R)
Retrieve the logarithm to the normalization constant obtained in the most recent propagation.
MaxNumberOfEMIterations() [[As Long]] (RW)
Retrieve the current maximum number of iterations for the EM algorithm.
MaxNumberOfSeparators() [[As Long]] (RW)
Retrieve the current maximum number of separators specified.
NormalDeviate(mean As Double, variance As Double) [[As Double]] (R)
Use the pseudo-random number generator for this Domain to sample a real number from a normal (aka Gaussian) distribution.
NormalizationConstant() [[As Double]] (R)
Returns the prior belief of the evidence propagated when using sum propagation or returns the belief of the most likely configuration when using max propagation (see hEquilibriums).
NumberOfCases() [[As Long]] (RW)
Adjust the storage capacity for cases in this domain.
SensitivitySet () [[As Collection]] (R)
Returns the sensitivity set computed by the most recent call to ComputeSensitivityData.
SensitivitySetByOutput (lOutput As Long) [[As Collection]] (R)
Returns the sensitivity set computed by the most recent call to ComputeSensitivityData.
SignificanceLevel() [[As Double]] (RW)
Read or Write the significance level of the dependency tests performed during structural learning using the PC-algorithm. Default is 0.05
TablesToPropagate() [[As Boolean]] (R)
True if any conditional probability table or utility table has changed and should be propagated (updating values in such a table does not require a compilation). Otherwise, False.
UniformDeviate() [[As Double]] (R)
Use the pseudo-random number generator for this Domain to sample a real number from the uniform distribution over the interval [0,1).
UserAttribute(strKey As String) [[As String]] (RW)
Holds the user attribute value for a given key.
fileName() [[As String]] (R)
Holds either "" or the file name used in the most recent save to or load from an hkb file (see SaveAsHKB and LoadDomainFromHKB).
nodes() [[As Collection]] (R)
Holds all Node objects of this domain.

Sub Procedures

Adapt()
Adapt the Domain from the inserted evidence
Approximate(dEpsilon As Double)
Removes low-probability configuration by giving them zero-probability. This will make Compress more effective with a cost of less precision.
Compile()
Compiles the domain with the default triangulation method (unless domain is already triangulated).
Compress()
Compresses a compiled domain by removing zero-value entries from the tables used internally in the compiled domain. Compression can be made more effective by also using the Approximate method.
ComputeSensitivityData(nodes as Collection, states As Collection)
Computes the constants of the sensitivity functions for the specified output probability and all CPT parameters in the network.
Delete()
Explicitly deletes a Domain object.
EndLogging()
Ends logging and closes log file. Should be called after StartLogging has been called. Logging is usefull when compiling (see Compile).
EnterCase(lIndex As Long)
Inserts the values of the case with the specified case index.
GenerateTables()
Generates the conditional probability tables for all nodes of this.
GetNodeSize(lW As Long, lH As Long)
Returns the node width and height through two reference arguments for all nodes in Domain.
Initialize()
Initializes all probabilities in a compiled Domain (and retracts all entered evidence).
LearnClassTables()
Learn the conditional probability tables for each class node with one ore more corresponding nodes in this Domain.
LearnStructure()
Learn the structure (graph) of the Bayesian network from data using the PC-algorithm.
LearnTables()
Learn the conditional probability tables for each node in this Domain that has an experience table.
Propagate(lEq As hEquilibriums, lEM As hEvidenceModes)
Updates all probabilities and utilities in a compiled Domain using the specified settings (see hEquilibriums and hEvidenceModes).
RemoveUserAttribute(strKey As String)
Removes the specified user attribute.
ResetInferenceEngine()
Initializes all probabilities in a compiled Domain (and preserves all entered evidence that will be propagated with the next call of Propagate).
RetractFindings()
Removes all evidence entered in the Domain.
SaveAsHKB(strFileName As String, lEndian As hEndians)
Saves current Domain in an hkb file using the specified file name.
SaveAsNet(strFileName As String)
Saves current Domain as a net file using the specified file name.
SaveAsProtectedHKB(strFileName As String, password As String)
Saves current Domain in an hkb file using the specified file name, and with the given password as protection.
SaveCase(fileName As String)
Save the inserted evidence into a case file
SaveCases(fileName As String, colNodes As Collection, cases As Variant, casecounts As Boolean, separator As String, missingData As String)
Save the inserted cases into a data file
SaveToMemory()
Saves a copy of the Domain in its current state in memory. This will make Initialize faster, since it can use this copy.
SeedRandom(seed As Long)
The configurations generated by simulate are not really random. Tey are generated using a pseudorandom number generator producing a sequence of numbers that although it appears random is actually completely deterministic. To change the starting point for the generator, use the following method. Seed the random generator located on Domain with seed.
SetNodeSize(lW As Long, lH As Long)
Sets node width and height for all nodes in Domain.
Simulate()
If Domain is compiled, generates a sample configuration from the joint distribution represented by the JunctionTree(s) of this Domain - else if the domain is not compiled generates a sample configuration determined by the tables associated with the nodes of the domain.
StartLogging(strFileName As String)
Starts logging in specified file. Logging is usefull when compiling (see Compile).
Triangulate(lTM As hTriangulationMethods)
Perform the triangulation step of the compilation process using a specific triangulation method. Calling Compile afterwards will use this triangulation.
TriangulateWithOrder(colNodes As Collection)
Perform the triangulation step of the compilation process using a specific elimination order. Calling Compile afterwards will use this triangulation.
Uncompile()
Explicitly destroy the result of the last compilation.
UpdatePolicies()
Updates policies for decision nodes in a compiled Domain using the Single Policy Update algorithm.

Functions

Clone () As Domain
Returns a clone of this Domain
GetAttributes() As Collection
Return an list of attrubutes for the current object.
GetMarginal(colNodes As Collection) As Table
Returns the marginal distribution of a collection of nodes.
GetNewExpressionFromString(strExpr As String, colParseMessages As Collection, iMaxMessages As Integer) As Expression
Create a new expression by parsing a string description of the expression.
GetNewNode(lCat As hCategories, lKind As hKinds) As Node
Returns a new node of the specified type (see hCategories and hKinds).
GetNodeByName(strName As String) As Node
Returns the Node object with the specified name (Nothing if no such node exists).
NewCase() As Long
Allocate storage within this domain to a new case. Returns new case index.
ParseCase(strFileName As String, colParseMessages As Collection, iMaxMessages As Integer)
Parse the case from the given file
ParseCases(strFileName As String, colParseMessages As Collection, iMaxMessages As Integer)
Parse the cases from the given file
ParseNodes(strFileName As String, colParseMessages As Collection, iMaxMessages As Integer) As Collection
Parse the nodes from the given file into a NodeList

Description

A Domain object represents a Bayesian belief network or an influence diagram. This is the most basic object - everything else origins from a Domain object. A Domain object has two very important states determined by the IsCompiled property. A "new" Domain object generated by GetNewDomain or LoadDomainFromNet is "uncompiled" (IsCompiled=False), and you cannot do propagations on it. You need to first call Compile. The "uncompiled" state is used when the domain is being build - when you add Node objects and modify their tables. Then, when you are done building, the domain is compiled and you will be able to do propagations on it. You are not able to use Belief on Node obejcts and similar properties and methods before a domain has been compiled.

What happens during compilation is that a secondary structure is generated which is better fit for calculating updated beliefs and expected utilities based on evidence. This secondary structure is a junction tree (represented by the JunctionTree object).*/


HUGIN Expert A/S, 2008 - comments to activex@hugin.com