test to construct DecisionTreeFactor from DiscreteConditional
parent
0515329c38
commit
3ee46ec280
|
|
@ -51,6 +51,11 @@ TEST( DecisionTreeFactor, constructors)
|
||||||
|
|
||||||
// Assert that error = -log(value)
|
// Assert that error = -log(value)
|
||||||
EXPECT_DOUBLES_EQUAL(-log(f1(values)), f1.error(values), 1e-9);
|
EXPECT_DOUBLES_EQUAL(-log(f1(values)), f1.error(values), 1e-9);
|
||||||
|
|
||||||
|
// Construct from DiscreteConditional
|
||||||
|
DiscreteConditional conditional(X | Y = "1/1 2/3 1/4");
|
||||||
|
DecisionTreeFactor f4(conditional);
|
||||||
|
EXPECT_DOUBLES_EQUAL(0.8, f4(values), 1e-9);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue