[bugfix] getQualityFromUncertainty giving worst quality for uncertainty values between two classes

Now the quality classes are exclusive lower bound and inclusive upper bound.
This commit is contained in:
Darius Arnold 2018-05-29 18:27:15 +02:00
parent 18926610cf
commit 756b5d67da

View File

@ -1193,13 +1193,13 @@ def getQualityFromUncertainty(uncertainty, Errors):
if uncertainty <= Errors[0]: if uncertainty <= Errors[0]:
quality = 0 quality = 0
elif (uncertainty > Errors[0]) and \ elif (uncertainty > Errors[0]) and \
(uncertainty < Errors[1]): (uncertainty <= Errors[1]):
quality = 1 quality = 1
elif (uncertainty > Errors[1]) and \ elif (uncertainty > Errors[1]) and \
(uncertainty < Errors[2]): (uncertainty <= Errors[2]):
quality = 2 quality = 2
elif (uncertainty > Errors[2]) and \ elif (uncertainty > Errors[2]) and \
(uncertainty < Errors[3]): (uncertainty <= Errors[3]):
quality = 3 quality = 3
elif uncertainty > Errors[3]: elif uncertainty > Errors[3]:
quality = 4 quality = 4