From f2ce809bd9b2e951cd7262382058b1b60071881a Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 7 Dec 2021 12:23:08 +0100 Subject: [PATCH 1/2] d0h! stop coding late at night --- doubtlab/reason.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doubtlab/reason.py b/doubtlab/reason.py index cfc57d3..4ab2f5d 100644 --- a/doubtlab/reason.py +++ b/doubtlab/reason.py @@ -153,7 +153,7 @@ def __call__(self, X, y): class MarginConfidenceReason: """ - Assign doubt when a the difference between the top two most confident classes is too large. + Assign doubt when a the difference between the top two most confident classes is too small. Throws an error when there are only two classes. @@ -191,7 +191,7 @@ def _calc_margin(self, probas): def __call__(self, X, y): probas = self.model.predict_proba(X) margin = self._calc_margin(probas) - return np.where(margin > self.threshold, margin, 0) + return np.where(margin < self.threshold, margin, 0) class ShortConfidenceReason: From c8ea7dece836f018817deb690d85400361d3782c Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 7 Dec 2021 12:39:39 +0100 Subject: [PATCH 2/2] increase-the-version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index d21e917..ed660c8 100644 --- a/setup.py +++ b/setup.py @@ -30,7 +30,7 @@ setup( name="doubtlab", - version="0.1.2", + version="0.1.3", author="Vincent D. Warmerdam", packages=find_packages(exclude=["notebooks", "docs"]), description="Don't Blindly Trust Your Labels",