use of org.kie.kogito.explainability.handlers.LimeExplainerServiceHandler in project kogito-apps by kiegroup.
the class ExplanationServiceImplTest method init.
@BeforeEach
@SuppressWarnings("unchecked")
void init() {
instance = mock(Instance.class);
limeExplainerMock = mock(LimeExplainer.class);
cfExplainerMock = mock(CounterfactualExplainer.class);
PredictionProviderFactory predictionProviderFactory = mock(PredictionProviderFactory.class);
explainerServiceHandlerRegistryMock = new LocalExplainerServiceHandlerRegistry(instance);
limeExplainerServiceHandlerMock = spy(new LimeExplainerServiceHandler(limeExplainerMock, predictionProviderFactory));
cfExplainerServiceHandlerMock = spy(new CounterfactualExplainerServiceHandler(cfExplainerMock, predictionProviderFactory, MAX_RUNNING_TIME_SECONDS));
predictionProviderMock = mock(PredictionProvider.class);
callbackMock = mock(Consumer.class);
explanationService = new ExplanationServiceImpl(explainerServiceHandlerRegistryMock);
when(predictionProviderFactory.createPredictionProvider(any(), any(), any())).thenReturn(predictionProviderMock);
}
Aggregations