Skip to content

Commit

Permalink
Fix significance error in report, fixes #101
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Bechberger committed Nov 14, 2019
1 parent bb1e417 commit 4cae802
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions temci/report/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1116,21 +1116,21 @@ class SignificanceTooLowWarning(StatWarning):
@classmethod
def check_value(cls, value) -> bool:
r = Settings()["stats/uncertainty_range"]
return r[0] <= value <= r[1]
return not (r[0] <= value <= r[1])


class SignificanceTooLowError(SignificanceTooLowWarning):
"""
Error message regarding an only insignificant difference regarding a statistical test.
The probability of the null hypothesis is lower than the lower end of the configured uncertainty range.
The probability of the null hypothesis is larger than the larger end of the configured uncertainty range.
"""

type = StatMessageType.ERROR

@classmethod
def check_value(cls, value) -> bool:
r = Settings()["stats/uncertainty_range"]
return r[1] < value
return not (r[1] < value)


class TestedPairProperty(BaseStatObject):
Expand Down

0 comments on commit 4cae802

Please sign in to comment.