Class QueryDistribution

    • Constructor Detail

      • QueryDistribution

        public QueryDistribution​(Distribution distribution)
        Initializes a new instance of the QueryDistribution class. The enabled property defaults to true.
        Parameters:
        distribution - The distribution to query.
      • QueryDistribution

        public QueryDistribution​(Distribution distribution,
                                 boolean isEnabled)
        Initializes a new instance of the QueryDistribution class.
        Parameters:
        distribution - The distribution to query.
        isEnabled - Sets the getIsEnabled() property.
    • Method Detail

      • copy

        public QueryDistribution copy()
        Copies this instance, creating a copy of the distribution as well.
        Returns:
        A copy of this instance.
      • getQueryDistance

        public QueryDistance getQueryDistance()
        Gets a value indicating whether the distance should be calculated between the query calculated with base evidence (or no evidence), and the same query calculated with evidence.

        The distance can be calculated against no evidence, or against base evidence which can be set on Inference.getBaseEvidence().

      • setQueryDistance

        public void setQueryDistance​(QueryDistance value)
        Sets a value indicating whether the distance should be calculated between the query calculated with base evidence (or no evidence), and the same query calculated with evidence.

        The distance can be calculated against no evidence, or against base evidence which can be set on Inference.getBaseEvidence().

      • getComparison

        public QueryComparison getComparison()
        Gets a value indicating whether queried values should be adjusted to show how they compare to the same query with no evidence, or base evidence.

        Using comparisons is useful when you want to measure the difference or lift of a prediction value, for example when spotting unusual patterns during data exploration, or making recommendations.

        The comparison can be calculated based on no evidence, or against base evidence which can be set on Inference.getBaseEvidence().

      • setComparison

        public void setComparison​(QueryComparison value)
        Sets a value indicating whether queried values should be adjusted to show how they compare to the same query with no evidence, or base evidence.

        Using comparisons is useful when you want to measure the difference or lift of a prediction value, for example when spotting unusual patterns during data exploration, or making recommendations.

        The comparison can be calculated based on no evidence, or against base evidence which can be set on Inference.getBaseEvidence().

      • getQueryLogLikelihood

        public boolean getQueryLogLikelihood()
        Determines whether or not to calculate the getLogLikelihood() specific to the evidence used to calculate this query. For more information see getLogLikelihood().
      • setQueryLogLikelihood

        public void setQueryLogLikelihood​(boolean value)
        Determines whether or not to calculate the getLogLikelihood() specific to the evidence used to calculate this query. For more information see getLogLikelihood().
      • getDistance

        public Double getDistance()
        The distance between this query calculated with base evidence or no evidence, and when calculated with evidence. Only calculated when getQueryDistance() is not None. This value can be null when the QueryDistance is set to None or the distance is undefined for the given queries.
      • setDistance

        public void setDistance​(Double value)
        The distance between this query calculated with base evidence or no evidence, and when calculated with evidence. Only calculated when getQueryDistance() is not None. This value can be null when the QueryDistance is set to None or the distance is undefined for the given queries.
      • getIsEnabled

        public boolean getIsEnabled()
        Gets a value indicating whether the distribution should be queried.
        Returns:
        true if the distribution should be queried; otherwise, false.
      • setIsEnabled

        public void setIsEnabled​(boolean value)
        Sets a value indicating whether the distribution should be queried.
        Parameters:
        value - true if the distribution should be queried; otherwise, false.
      • getDistribution

        public Distribution getDistribution()
        Gets the distribution to query.
        Returns:
        The distribution.
      • toString

        public String toString()
        Returns a String that represents this instance.
        Overrides:
        toString in class Object
        Returns:
        A String that represents this instance.