use of org.kie.kogito.explainability.local.counterfactual.entities.IntegerEntity in project kogito-apps by kiegroup.
the class CounterfactualEntityFactoryTest method testIntegerFactory.
@Test
void testIntegerFactory() {
final int value = 5;
final FeatureDomain domain = NumericalFeatureDomain.create(0.0, 10.0);
final Feature feature = FeatureFactory.newNumericalFeature("int-feature", value, domain);
final CounterfactualEntity counterfactualEntity = CounterfactualEntityFactory.from(feature);
assertTrue(counterfactualEntity instanceof IntegerEntity);
assertEquals(value, counterfactualEntity.asFeature().getValue().asNumber());
}
Aggregations