Class PredictionOutcome


  • public class PredictionOutcome
    extends java.lang.Object
    Encapsulates results from a PredictionService.
    • Constructor Summary

      Constructors 
      Constructor Description
      PredictionOutcome()
      Creates an empty prediction.
      PredictionOutcome​(double confidenceLevel, double confidenceThreshold, java.util.Map<java.lang.String,​java.lang.Object> data)
      Returns a prediction for a prediction service with the specified confidence level, confidence threshold and outcome.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      double getConfidenceLevel()  
      double getConfidenceThreshold()  
      java.util.Map<java.lang.String,​java.lang.Object> getData()  
      boolean isCertain()
      Returns true if a prediction has a confidence level above the specified threshold otherwise false
      boolean isPresent()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PredictionOutcome

        public PredictionOutcome()
        Creates an empty prediction.
      • PredictionOutcome

        public PredictionOutcome​(double confidenceLevel,
                                 double confidenceThreshold,
                                 java.util.Map<java.lang.String,​java.lang.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 prediction
        confidenceThreshold - The threshold above which a prediction should be automatically accepted
        data - A map containing the outcome names and values (respectively as map keys and values)
    • Method Detail

      • 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

        public java.util.Map<java.lang.String,​java.lang.Object> getData()