Skip to content

Commit

Permalink
Merge pull request #44 from duarteocarmo/main
Browse files Browse the repository at this point in the history
Upgraded cleanlab and package fixes
  • Loading branch information
koaning committed Apr 22, 2022
2 parents 83e437c + d1d8c76 commit 03b43fa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions doubtlab/reason.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
from cleanlab.pruning import get_noise_indices
from cleanlab.filter import find_label_issues


class ProbaReason:
Expand Down Expand Up @@ -644,7 +644,9 @@ def from_proba(proba, y, min_doubt=0.5, sorted_index_method="normalized_margin")
predicate = CleanlabReason.from_proba(probas, y)
```
"""
ordered_label_errors = get_noise_indices(y, proba, sorted_index_method)
ordered_label_errors = find_label_issues(
y, proba, return_indices_ranked_by=sorted_index_method
)
result = np.zeros_like(y)
conf_arr = np.linspace(1, min_doubt, result.shape[0])
for idx, _ in zip(ordered_label_errors, conf_arr):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup, find_packages


base_packages = ["scikit-learn>=1.0.0", "cleanlab>=1.0", "pandas>=1.3.3"]
base_packages = ["scikit-learn>=1.0.0", "cleanlab>=2.0", "pandas>=1.3.3"]

docs_packages = [
"mkdocs==1.1",
Expand All @@ -27,7 +27,7 @@

setup(
name="doubtlab",
version="0.2.2",
version="0.2.3",
author="Vincent D. Warmerdam",
packages=find_packages(exclude=["notebooks", "docs"]),
description="Don't Blindly Trust Your Labels",
Expand Down

0 comments on commit 03b43fa

Please sign in to comment.