Do ActivateRelevance and EnableNoisyMAXRelevance enable/disable both of them? or which one?
ActivateRelevance only enables evidence propagation and value invalidation. EnableNoisyMAXRelevance is only used during simplification.
When I call SetEvidence, does it only propagate&invalidate or also simplify?
SetEvidence will cause propagation/invalidation. Simplification is only performed as part of inference.
What do you mean by skid?
See this link:
http://software.intel.com/en-us/article ... incorrect/Is it important to set targets first and evidence afterwards, or should it be done the other way round? Or does it not matter?
Theoretically, there could be a performance benefit if you set targets first - evidence propagation may be faster. As always, this depends on the structure/parameters in the network.
I measure the times of the different steps separately. I was already wondering if the time for setting targets gets wasted in my own code, but I only have a set<int> of the node handles that should be targets, I iterate over the network nodes, compare to the set<int>, and if it doesn't correspond I change the status.
You can ClearAllTargets, then iterate over contents of your set<int>. However, even with hunders of nodes this should not be a significant part of the entire calculation.
I do the same with evidence where I use a map<int, int> but setting targets takes about double the time! No matter which algorithm (sampling or clustering) is configured.
The choice of inference algorithm has no influence on the time required to perform SetTarget call.
Depending on target set and evidence SMILE may split network into separate fragments
Not just for DSL_ALG_BN_RELEVANCEDECOMP and DSL_ALG_BN_RELEVANCEDECOMP2?
No, this happens for most of the inference algorithms as a preprocessing phase. The relevance decomposition algorithms take it one step further and call inference multiple times if target set can be split.
Note that DSL_ALG_BN_LAURITZEN will try to fallback into decomposition mode if a) there's more than one target and b) triangulation results in a jointree size above preset threshold.
Interesting! Can I see somehow from outside whether this happened or not?
No, there's no callback mechanism for this.
Is that threshold hard-coded? Is it machine-dependent? Or can I set it through the API?
The following network properties can be used to set the thresolds - they may change anytime, do not consider them to be oficially supported:
DSL_REL_DECOMP_THRESHOLD - unit: node count, default value: 32. This sets number of targets in the group for linear relevance decomposition. Example: you have network with 100 targets. If linear decomposition is used directly or as a fallback, there will be 4 target groups, three with 32 nodes and one with 4 nodes. Assignments are done on partial order basis
DSL_REL_DECOMP_THRESHOLD2 - unit: total size of jointree, as measured by number of entries in the cliques, default value 65536. This property applies to recursive decomposition. SMILE splits the target set in two, checks the jointree size for each half. If jointree size is below the value, inference runs. Otherwise the target subset is again split in two. This will continue until target subset contains single node.
DSL_REL_DECOMP_THRESHOLD3 - unit: total size of jointree, default value 0. This value controls the switch from linear to recursive decomposition inside linear decomp. Zero means that linear will use the thresold specified by DSL_REL_DECOMP_THRESHOLD2.
DSL_REL_DECOMP_DISABLE_FALLBACK - no unit. The presence of this property (regardless of its value) blocks the automatic fallback inside Lauritzen algorithm. If property is not present, the failure to triangulate the network using all targets at once will cause linear decomposition to run. In turn, linear can switch to recursive as described above.