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

java.lang.Object
org.tweetyproject.logics.commons.analysis.InconsistencyMeasureReport<T,U>

public class InconsistencyMeasureReport<T extends Formula,U extends BeliefSet<T,?>> extends 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:
  • Constructor Summary

    Constructors
    Constructor
    Description
    InconsistencyMeasureReport(List<String> measures, List<U> instances, List<String> instances_names, Map<String,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
    Counts the number of timed out entries in the results of the given inconsistency measure.
    Returns the result for the ith instance for the given measure.
    Returns the result for the ith instance for the given measure.
    getIthResult(String measure, int i)
    Returns the result for the ith instance for the given measure.
    long
    getMaxTime(String measure)
    Returns the maximum time in the results of the given inconsistency measure, not counting the timed out instances.
    double
    Returns the mean time in the results of the given inconsistency measure, not counting the timed out instances.
    long
    getMinTime(String measure)
    Returns the minimum time in the results of the given inconsistency measure, not counting the timed out instances.
    getStats(String measure)
    Returns a list containing statistics about the given inconsistency measure: number of timeouts, mean time, median time and min and max time.
    Returns a set of all timed out instances of the dataset wrt.
    boolean
     
    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 Details

    • InconsistencyMeasureReport

      public InconsistencyMeasureReport(List<String> measures, List<U> instances, List<String> instances_names, Map<String,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 Details

    • getIthResult

      public InconsistencyMeasureResult getIthResult(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 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 Set<U> getTimedOutInstances(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(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(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(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(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 Map<String,Integer> getStats(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 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