Search in sources :

Example 1 with FixedLongEntity

use of org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedLongEntity in project kogito-apps by kiegroup.

the class CounterfactualEntityFactoryTest method testFixedLongFactory.

@Test
void testFixedLongFactory() {
    final long value = 5;
    final Feature feature = FeatureFactory.newNumericalFeature("long-feature", value);
    final CounterfactualEntity counterfactualEntity = CounterfactualEntityFactory.from(feature);
    assertNotNull(counterfactualEntity);
    assertTrue(counterfactualEntity instanceof FixedLongEntity);
    assertEquals(value, counterfactualEntity.asFeature().getValue().asNumber());
}
Also used : CounterfactualEntity(org.kie.kogito.explainability.local.counterfactual.entities.CounterfactualEntity) Feature(org.kie.kogito.explainability.model.Feature) FixedLongEntity(org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedLongEntity) Test(org.junit.jupiter.api.Test)

Aggregations

Test (org.junit.jupiter.api.Test)1 CounterfactualEntity (org.kie.kogito.explainability.local.counterfactual.entities.CounterfactualEntity)1 FixedLongEntity (org.kie.kogito.explainability.local.counterfactual.entities.fixed.FixedLongEntity)1 Feature (org.kie.kogito.explainability.model.Feature)1