fixed sorting predictions by probabilities in wrong order
This commit is contained in:
parent
95209a5c9d
commit
ad6bb80900
@ -36,7 +36,7 @@ class Classifier:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def __format_array_prediction_format(self, prediction):
|
def __format_array_prediction_format(self, prediction):
|
||||||
cls2prob = dict(sorted(zip(self._classes, prediction), key=itemgetter(1)))
|
cls2prob = dict(sorted(zip(self._classes, prediction), key=itemgetter(1), reverse=True))
|
||||||
most_likely = [*cls2prob][0]
|
most_likely = [*cls2prob][0]
|
||||||
return {"label": most_likely, "probabilities": cls2prob}
|
return {"label": most_likely, "probabilities": cls2prob}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user