remove timers
parent
62d020a531
commit
df0c5d7ca0
|
|
@ -129,7 +129,6 @@ std::function<double(const Assignment<Key> &, double)> prunerFunc(
|
|||
DecisionTreeFactor HybridBayesNet::pruneDiscreteConditionals(
|
||||
size_t maxNrLeaves) {
|
||||
// Get the joint distribution of only the discrete keys
|
||||
gttic_(HybridBayesNet_PruneDiscreteConditionals);
|
||||
// The joint discrete probability.
|
||||
DiscreteConditional discreteProbs;
|
||||
|
||||
|
|
@ -147,12 +146,11 @@ DecisionTreeFactor HybridBayesNet::pruneDiscreteConditionals(
|
|||
discrete_factor_idxs.push_back(i);
|
||||
}
|
||||
}
|
||||
|
||||
const DecisionTreeFactor prunedDiscreteProbs =
|
||||
discreteProbs.prune(maxNrLeaves);
|
||||
gttoc_(HybridBayesNet_PruneDiscreteConditionals);
|
||||
|
||||
// Eliminate joint probability back into conditionals
|
||||
gttic_(HybridBayesNet_UpdateDiscreteConditionals);
|
||||
DiscreteFactorGraph dfg{prunedDiscreteProbs};
|
||||
DiscreteBayesNet::shared_ptr dbn = dfg.eliminateSequential(discrete_frontals);
|
||||
|
||||
|
|
@ -161,7 +159,6 @@ DecisionTreeFactor HybridBayesNet::pruneDiscreteConditionals(
|
|||
size_t idx = discrete_factor_idxs.at(i);
|
||||
this->at(idx) = std::make_shared<HybridConditional>(dbn->at(i));
|
||||
}
|
||||
gttoc_(HybridBayesNet_UpdateDiscreteConditionals);
|
||||
|
||||
return prunedDiscreteProbs;
|
||||
}
|
||||
|
|
@ -180,7 +177,6 @@ HybridBayesNet HybridBayesNet::prune(size_t maxNrLeaves) {
|
|||
|
||||
HybridBayesNet prunedBayesNetFragment;
|
||||
|
||||
gttic_(HybridBayesNet_PruneMixtures);
|
||||
// Go through all the conditionals in the
|
||||
// Bayes Net and prune them as per prunedDiscreteProbs.
|
||||
for (auto &&conditional : *this) {
|
||||
|
|
@ -197,7 +193,6 @@ HybridBayesNet HybridBayesNet::prune(size_t maxNrLeaves) {
|
|||
prunedBayesNetFragment.push_back(conditional);
|
||||
}
|
||||
}
|
||||
gttoc_(HybridBayesNet_PruneMixtures);
|
||||
|
||||
return prunedBayesNetFragment;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -96,7 +96,6 @@ static GaussianFactorGraphTree addGaussian(
|
|||
// TODO(dellaert): it's probably more efficient to first collect the discrete
|
||||
// keys, and then loop over all assignments to populate a vector.
|
||||
GaussianFactorGraphTree HybridGaussianFactorGraph::assembleGraphTree() const {
|
||||
gttic_(assembleGraphTree);
|
||||
|
||||
GaussianFactorGraphTree result;
|
||||
|
||||
|
|
@ -129,8 +128,6 @@ GaussianFactorGraphTree HybridGaussianFactorGraph::assembleGraphTree() const {
|
|||
}
|
||||
}
|
||||
|
||||
gttoc_(assembleGraphTree);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue