Revert "update tests"

This reverts commit e6567457b5.
release/4.3a0
Varun Agrawal 2025-01-03 13:42:48 -05:00
parent c6c451bee1
commit ffe14d39aa
1 changed files with 14 additions and 8 deletions

View File

@ -226,6 +226,12 @@ void maybeSaveDotFile(const DecisionTreeFactor& f, const string& filename) {
#endif #endif
} }
/** Convert Signature into CPT */
DecisionTreeFactor create(const Signature& signature) {
DecisionTreeFactor p(signature.discreteKeys(), signature.cpt());
return p;
}
/* ************************************************************************* */ /* ************************************************************************* */
// test Asia Joint // test Asia Joint
TEST(DecisionTreeFactor, joint) { TEST(DecisionTreeFactor, joint) {
@ -233,14 +239,14 @@ TEST(DecisionTreeFactor, joint) {
D(7, 2); D(7, 2);
gttic_(asiaCPTs); gttic_(asiaCPTs);
DecisionTreeFactor pA(A % "99/1"); DecisionTreeFactor pA = create(A % "99/1");
DecisionTreeFactor pS(S % "50/50"); DecisionTreeFactor pS = create(S % "50/50");
DecisionTreeFactor pT(T | A = "99/1 95/5"); DecisionTreeFactor pT = create(T | A = "99/1 95/5");
DecisionTreeFactor pL(L | S = "99/1 90/10"); DecisionTreeFactor pL = create(L | S = "99/1 90/10");
DecisionTreeFactor pB(B | S = "70/30 40/60"); DecisionTreeFactor pB = create(B | S = "70/30 40/60");
DecisionTreeFactor pE((E | T, L) = "F T T T"); DecisionTreeFactor pE = create((E | T, L) = "F T T T");
DecisionTreeFactor pX(X | E = "95/5 2/98"); DecisionTreeFactor pX = create(X | E = "95/5 2/98");
DecisionTreeFactor pD((D | E, B) = "9/1 2/8 3/7 1/9"); DecisionTreeFactor pD = create((D | E, B) = "9/1 2/8 3/7 1/9");
// Create joint // Create joint
gttic_(asiaJoint); gttic_(asiaJoint);