improve tests
parent
5ea63be8c5
commit
9b92d153fc
|
|
@ -188,12 +188,14 @@ TEST(HybridBayesNet, Optimize) {
|
||||||
|
|
||||||
HybridValues delta = hybridBayesNet->optimize();
|
HybridValues delta = hybridBayesNet->optimize();
|
||||||
|
|
||||||
|
//TODO(Varun) The expectedAssignment should be 111, not 101
|
||||||
DiscreteValues expectedAssignment;
|
DiscreteValues expectedAssignment;
|
||||||
expectedAssignment[M(0)] = 1;
|
expectedAssignment[M(0)] = 1;
|
||||||
expectedAssignment[M(1)] = 0;
|
expectedAssignment[M(1)] = 0;
|
||||||
expectedAssignment[M(2)] = 1;
|
expectedAssignment[M(2)] = 1;
|
||||||
EXPECT(assert_equal(expectedAssignment, delta.discrete()));
|
EXPECT(assert_equal(expectedAssignment, delta.discrete()));
|
||||||
|
|
||||||
|
//TODO(Varun) This should be all -Vector1::Ones()
|
||||||
VectorValues expectedValues;
|
VectorValues expectedValues;
|
||||||
expectedValues.insert(X(0), -0.999904 * Vector1::Ones());
|
expectedValues.insert(X(0), -0.999904 * Vector1::Ones());
|
||||||
expectedValues.insert(X(1), -0.99029 * Vector1::Ones());
|
expectedValues.insert(X(1), -0.99029 * Vector1::Ones());
|
||||||
|
|
|
||||||
|
|
@ -282,8 +282,7 @@ AlgebraicDecisionTree<Key> getProbPrimeTree(
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/**
|
/**
|
||||||
* Test for correctness of different branches of the P'(Continuous |
|
* Test for correctness of different branches of the P'(Continuous | Discrete).
|
||||||
Discrete).
|
|
||||||
* The values should match those of P'(Continuous) for each discrete mode.
|
* The values should match those of P'(Continuous) for each discrete mode.
|
||||||
*/
|
*/
|
||||||
TEST(HybridEstimation, Probability) {
|
TEST(HybridEstimation, Probability) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue