use DiscreteBayesNet::joint in HybridBayesNet
parent
4d97136f5c
commit
de4233dcd6
|
@ -53,11 +53,11 @@ HybridBayesNet HybridBayesNet::prune(
|
||||||
|
|
||||||
// Prune discrete Bayes net
|
// Prune discrete Bayes net
|
||||||
DiscreteValues fixed;
|
DiscreteValues fixed;
|
||||||
auto prunedBN = marginal.prune(maxNrLeaves, marginalThreshold, &fixed);
|
DiscreteBayesNet prunedBN =
|
||||||
|
marginal.prune(maxNrLeaves, marginalThreshold, &fixed);
|
||||||
|
|
||||||
// Multiply into one big conditional. NOTE: possibly quite expensive.
|
// Multiply into one big conditional. NOTE: possibly quite expensive.
|
||||||
DiscreteConditional pruned;
|
DiscreteConditional pruned = prunedBN.joint();
|
||||||
for (auto &&conditional : prunedBN) pruned = pruned * (*conditional);
|
|
||||||
|
|
||||||
// Set the fixed values if requested.
|
// Set the fixed values if requested.
|
||||||
if (marginalThreshold && fixedValues) {
|
if (marginalThreshold && fixedValues) {
|
||||||
|
|
Loading…
Reference in New Issue