Address review comments

release/4.3a0
Frank Dellaert 2023-07-16 12:37:01 +02:00
parent 3d979763f0
commit 3edde4d693
4 changed files with 8 additions and 8 deletions

View File

@ -76,7 +76,7 @@ GTSAM_CONCEPT_TESTABLE_INST(CrazyDecisionTree)
/* ************************************************************************** */
// Create a decision stump one one variable 'a' with values 10 and 20.
TEST(DecisionTree, constructor) {
TEST(DecisionTree, Constructor) {
DecisionTree<char, int> tree('a', 10, 20);
// Evaluate the tree on an assignment to the variable.
@ -129,7 +129,7 @@ struct Ring {
/* ************************************************************************** */
// Check that creating decision trees respects key order.
TEST(DecisionTree, constructor_order) {
TEST(DecisionTree, ConstructorOrder) {
// Create labels
string A("A"), B("B");
@ -159,7 +159,7 @@ TEST(DecisionTree, constructor_order) {
/* ************************************************************************** */
// test DT
TEST(DecisionTree, example) {
TEST(DecisionTree, Example) {
// Create labels
string A("A"), B("B"), C("C");

View File

@ -28,7 +28,7 @@ using namespace std;
using namespace gtsam;
/* ************************************************************************* */
TEST(DecisionTreeFactor, constructors_match) {
TEST(DecisionTreeFactor, ConstructorsMatch) {
// Declare two keys
DiscreteKey X(0, 2), Y(1, 3);

View File

@ -140,7 +140,7 @@ namespace gtsam {
/** Access the conditional */
const sharedConditional& conditional() const { return conditional_; }
/// Is this the root of a Bayes tree?
/// Return true if this clique is the root of a Bayes tree.
inline bool isRoot() const { return parent_.expired(); }
/// Return the number of children.

View File

@ -20,7 +20,7 @@ from gtsam.utils.test_case import GtsamTestCase
import gtsam
from gtsam import (DiscreteBayesNet, DiscreteBayesTreeClique,
DiscreteConditional, DiscreteFactorGraph,
DiscreteKeys, DiscreteValues, Ordering)
DiscreteValues, Ordering)
class TestDiscreteBayesNet(GtsamTestCase):
@ -121,7 +121,7 @@ class TestDiscreteBayesNet(GtsamTestCase):
graph.add([x2, a2, x3], table)
# Eliminate for MPE (maximum probable explanation).
ordering = Ordering([A(2), X(3), X(1), A(1), X(2)])
ordering = Ordering(keys=[A(2), X(3), X(1), A(1), X(2)])
lookup = graph.eliminateMultifrontal(ordering, gtsam.EliminateForMPE)
# Check that the lookup table is correct