Class PredictionOutcome
java.lang.Object
org.kie.internal.task.api.prediction.PredictionOutcome
Encapsulates results from a
PredictionService.-
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty prediction.PredictionOutcome(double confidenceLevel, double confidenceThreshold, Map<String, Object> data) Returns a prediction for a prediction service with the specified confidence level, confidence threshold and outcome. -
Method Summary
Modifier and TypeMethodDescriptiondoubledoublegetData()booleanReturns true if a prediction has a confidence level above the specified threshold otherwise falseboolean
-
Constructor Details
-
PredictionOutcome
public PredictionOutcome()Creates an empty prediction. -
PredictionOutcome
public PredictionOutcome(double confidenceLevel, double confidenceThreshold, Map<String, Object> data) Returns a prediction for a prediction service with the specified confidence level, confidence threshold and outcome.- Parameters:
confidenceLevel- Numerical value to quantify confidence level for this predictionconfidenceThreshold- The threshold above which a prediction should be automatically accepteddata- A map containing the outcome names and values (respectively as map keys and values)
-
-
Method Details
-
isPresent
public boolean isPresent() -
isCertain
public boolean isCertain()Returns true if a prediction has a confidence level above the specified threshold otherwise false -
getConfidenceLevel
public double getConfidenceLevel() -
getConfidenceThreshold
public double getConfidenceThreshold() -
getData
-