java.lang.Object
org.tweetyproject.logics.commons.analysis.InconsistencyMeasureReport<T,U>
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
ConstructorDescriptionInconsistencyMeasureReport
(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 TypeMethodDescriptionint
countTimeouts
(String measure) Counts the number of timed out entries in the results of the given inconsistency measure.getIthInstance
(int i) Returns the result for the ith instance for the given measure.getIthInstanceName
(int i) 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
getMeanTime
(String measure) 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.Returns a list containing statistics about the given inconsistency measure: number of timeouts, mean time, median time and min and max time.getTimedOutInstances
(String measure) Returns a set of all timed out instances of the dataset wrt.boolean
isEmpty()
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.
-
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 namesinstances
- list of knowledge basesinstances_names
- names knowledge basesresults
- map of InconsistencyMeasure names and lists of computed inconsistency values
-
-
Method Details
-
getIthResult
Returns the result for the ith instance for the given measure.- Parameters:
measure
- name of inconsistency measurei
- number of instance- Returns:
- result for ith instance for the given measure
-
getIthInstance
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
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
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
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
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
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
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
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
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 returnedmarkConflictingResults
- 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
-