Class InconsistencyMeasureReport<T extends Formula,​U extends BeliefSet<T,​?>>


  • public class InconsistencyMeasureReport<T extends Formula,​U extends BeliefSet<T,​?>>
    extends java.lang.Object
    This class summarizes the results of computing inconsistency values for some collection of knowledge bases using some set of inconsistency measures, including computation times and some statistics.
    Author:
    Anna Gessler
    See Also:
    InconsistencyMeasureEvaluator
    • Constructor Summary

      Constructors 
      Constructor Description
      InconsistencyMeasureReport​(java.util.List<java.lang.String> measures, java.util.List<U> instances, java.util.List<java.lang.String> instances_names, java.util.Map<java.lang.String,​java.util.List<InconsistencyMeasureResult>> results)
      Creates a new InconsistencyMeasureReport with the given results, the given list of measures used and the given list of knowledge bases used.
    • Method Summary

      Modifier and Type Method Description
      int countTimeouts​(java.lang.String measure)
      Counts the number of timed out entries in the results of the given inconsistency measure.
      U getIthInstance​(int i)
      Returns the result for the ith instance for the given measure.
      java.lang.String getIthInstanceName​(int i)
      Returns the result for the ith instance for the given measure.
      InconsistencyMeasureResult getIthResult​(java.lang.String measure, int i)
      Returns the result for the ith instance for the given measure.
      long getMaxTime​(java.lang.String measure)
      Returns the maximum time in the results of the given inconsistency measure, not counting the timed out instances.
      double getMeanTime​(java.lang.String measure)
      Returns the mean time in the results of the given inconsistency measure, not counting the timed out instances.
      long getMinTime​(java.lang.String measure)
      Returns the minimum time in the results of the given inconsistency measure, not counting the timed out instances.
      java.util.Map<java.lang.String,​java.lang.Integer> getStats​(java.lang.String measure)
      Returns a list containing statistics about the given inconsistency measure: number of timeouts, mean time, median time and min and max time.
      java.util.Set<U> getTimedOutInstances​(java.lang.String measure)
      Returns a set of all timed out instances of the dataset wrt.
      boolean isEmpty()  
      java.lang.String prettyPrint​(boolean printFullReport, boolean markConflictingResults)
      Prints the results, times and some statistics like average times and the number of timeouts for this InconsistencyMeasureReport in table form.
      • Methods inherited from class java.lang.Object

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

      • InconsistencyMeasureReport

        public InconsistencyMeasureReport​(java.util.List<java.lang.String> measures,
                                          java.util.List<U> instances,
                                          java.util.List<java.lang.String> instances_names,
                                          java.util.Map<java.lang.String,​java.util.List<InconsistencyMeasureResult>> results)
        Creates a new InconsistencyMeasureReport with the given results, the given list of measures used and the given list of knowledge bases used.
        Parameters:
        measures - list of strings representing inconsistency measure names
        instances - list of knowledge bases
        instances_names - names knowledge bases
        results - map of InconsistencyMeasure names and lists of computed inconsistency values
    • Method Detail

      • getIthResult

        public InconsistencyMeasureResult getIthResult​(java.lang.String measure,
                                                       int i)
        Returns the result for the ith instance for the given measure.
        Parameters:
        measure - name of inconsistency measure
        i - number of instance
        Returns:
        result for ith instance for the given measure
      • getIthInstance

        public U getIthInstance​(int i)
        Returns the result for the ith instance for the given measure.
        Parameters:
        i - number of instance
        Returns:
        result for ith instance for the given measure
      • getIthInstanceName

        public java.lang.String getIthInstanceName​(int i)
        Returns the result for the ith instance for the given measure. *
        Parameters:
        i - number of instance
        Returns:
        result for ith instance for the given measure
      • getTimedOutInstances

        public java.util.Set<U> getTimedOutInstances​(java.lang.String measure)
        Returns a set of all timed out instances of the dataset wrt. the given measure.
        Parameters:
        measure - name of inconsistency measure
        Returns:
        set of timed out instances
      • getMeanTime

        public double getMeanTime​(java.lang.String measure)
        Returns the mean time in the results of the given inconsistency measure, not counting the timed out instances. Returns -1 if all instances are timed out instances.
        Parameters:
        measure - name of inconsistency measure
        Returns:
        mean time
      • getMaxTime

        public long getMaxTime​(java.lang.String measure)
        Returns the maximum time in the results of the given inconsistency measure, not counting the timed out instances. Returns -1 if all instances are timed out instances.
        Parameters:
        measure - name of inconsistency measure
        Returns:
        maximum time
      • getMinTime

        public long getMinTime​(java.lang.String measure)
        Returns the minimum time in the results of the given inconsistency measure, not counting the timed out instances. Returns -1 if all instances are timed out instances.
        Parameters:
        measure - name of inconsistency measure
        Returns:
        minimum time
      • countTimeouts

        public int countTimeouts​(java.lang.String measure)
        Counts the number of timed out entries in the results of the given inconsistency measure.
        Parameters:
        measure - name of inconsistency measure
        Returns:
        number of timeouts
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if this report is empty, i.e. if it contains no measures or no belief set instances and therefore no results.
      • getStats

        public java.util.Map<java.lang.String,​java.lang.Integer> getStats​(java.lang.String measure)
        Returns a list containing statistics about the given inconsistency measure: number of timeouts, mean time, median time and min and max time.
        Parameters:
        measure - name of inconsistency measure
        Returns:
        map of statistics for this measure
      • prettyPrint

        public java.lang.String prettyPrint​(boolean printFullReport,
                                            boolean markConflictingResults)
        Prints the results, times and some statistics like average times and the number of timeouts for this InconsistencyMeasureReport in table form.
        Parameters:
        printFullReport - if set to true, the computed inconsistency values and times for all knowledge bases are included, otherwise only a minimal report is returned
        markConflictingResults - if set to true, instances that have different values for at least some of the measures are highlighted. Only visible if printFullReport is also true.
        Returns:
        prettyPrint of this report