Search in sources :

Example 1 with RecordingLimeExplainer

use of org.kie.kogito.explainability.local.lime.optim.RecordingLimeExplainer in project kogito-apps by kiegroup.

the class LimeExplainerProducer method produce.

@Produces
public LimeExplainer produce() {
    LOG.debug("LimeExplainer created (numberOfSamples={}, numberOfPerturbations={})", numberOfSamples, numberOfPerturbations);
    LimeConfig limeConfig = new LimeConfig().withSamples(numberOfSamples).withPerturbationContext(new PerturbationContext(new SecureRandom(), numberOfPerturbations));
    return new RecordingLimeExplainer(limeConfig, recordedPredictions);
}
Also used : PerturbationContext(org.kie.kogito.explainability.model.PerturbationContext) SecureRandom(java.security.SecureRandom) RecordingLimeExplainer(org.kie.kogito.explainability.local.lime.optim.RecordingLimeExplainer) LimeConfig(org.kie.kogito.explainability.local.lime.LimeConfig) Produces(javax.enterprise.inject.Produces)

Aggregations

SecureRandom (java.security.SecureRandom)1 Produces (javax.enterprise.inject.Produces)1 LimeConfig (org.kie.kogito.explainability.local.lime.LimeConfig)1 RecordingLimeExplainer (org.kie.kogito.explainability.local.lime.optim.RecordingLimeExplainer)1 PerturbationContext (org.kie.kogito.explainability.model.PerturbationContext)1