improve tests

release/4.3a0
Varun Agrawal 2022-12-30 14:34:11 +05:30
parent 5ea63be8c5
commit 9b92d153fc
2 changed files with 3 additions and 2 deletions

View File

@ -188,12 +188,14 @@ TEST(HybridBayesNet, Optimize) {
HybridValues delta = hybridBayesNet->optimize();
//TODO(Varun) The expectedAssignment should be 111, not 101
DiscreteValues expectedAssignment;
expectedAssignment[M(0)] = 1;
expectedAssignment[M(1)] = 0;
expectedAssignment[M(2)] = 1;
EXPECT(assert_equal(expectedAssignment, delta.discrete()));
//TODO(Varun) This should be all -Vector1::Ones()
VectorValues expectedValues;
expectedValues.insert(X(0), -0.999904 * Vector1::Ones());
expectedValues.insert(X(1), -0.99029 * Vector1::Ones());

View File

@ -282,8 +282,7 @@ AlgebraicDecisionTree<Key> getProbPrimeTree(
/****************************************************************************/
/**
* Test for correctness of different branches of the P'(Continuous |
Discrete).
* Test for correctness of different branches of the P'(Continuous | Discrete).
* The values should match those of P'(Continuous) for each discrete mode.
*/
TEST(HybridEstimation, Probability) {