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: 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",