From d01bf5d80b190f2f595c783de85958bac85f6206 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 15 May 2025 22:59:26 -0400 Subject: [PATCH] some docs --- python/gtsam/tests/test_DiscreteBayesNet.py | 2 ++ python/gtsam/tests/test_GaussianBayesNet.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/python/gtsam/tests/test_DiscreteBayesNet.py b/python/gtsam/tests/test_DiscreteBayesNet.py index 471d82264..861d6dc49 100644 --- a/python/gtsam/tests/test_DiscreteBayesNet.py +++ b/python/gtsam/tests/test_DiscreteBayesNet.py @@ -49,6 +49,7 @@ class TestDiscreteConditional(GtsamTestCase): # Sample with only 1 variable conditional = DiscreteConditional(self.key, "7/3") + # Sample multiple times and average to get mean p = 0 for _ in range(niters): p += conditional.sample(rng) @@ -57,6 +58,7 @@ class TestDiscreteConditional(GtsamTestCase): # Sample with variable and parent conditional = DiscreteConditional(self.key, self.parents, "7/3 2/8") + # Sample multiple times and average to get mean p = 0 parentValues = gtsam.DiscreteValues() parentValues[self.parent[0]] = 1 diff --git a/python/gtsam/tests/test_GaussianBayesNet.py b/python/gtsam/tests/test_GaussianBayesNet.py index 468ee8de5..31ec1c3bc 100644 --- a/python/gtsam/tests/test_GaussianBayesNet.py +++ b/python/gtsam/tests/test_GaussianBayesNet.py @@ -71,7 +71,7 @@ class TestGaussianBayesNet(GtsamTestCase): # Sample with rng rng = gtsam.MT19937(42) conditional = GaussianConditional(_x_, [9.0], I_1x1) - # Sample multiple times and average to gey mean + # Sample multiple times and average to get mean val = 0 niters = 10000 for _ in range(niters):