文件历史

提交图

573 次代码提交

作者 SHA1 备注 提交日期
Ulyana 70a2ed2fa2 Add clipping of small probabilities to address issue #639 (#647)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-03-12 20:51:03 -07:00
Jonas Mueller 44081c6538 add activelab name to docs (#648)
Co-authored-by: huiwengoh <45724323+huiwengoh@users.noreply.github.com>
2023-03-12 20:26:04 -07:00
Jonas Mueller 2a16c473fc post v2.3.0 release version bump (#646) 2023-03-12 20:23:37 -07:00
Jonas Mueller 38e1dab34d bump version number 2023-03-01 00:39:35 -08:00
Hui Wen dbc87116ea Documentation improvements (#643) 2023-02-28 16:06:17 -08:00
Anish Athalye 570ecbdcb8 Switch to typing.Self (#489)
PEP 673 [1] introduces `typing.Self` as a simple way to annotate methods
that return an instance of their class. This patch adopts `typing.Self`.

Because this is only included in Python 3.11, for backwards
compatibility, this patch adds typing-extensions [2], an
officially-supported module that is designed for enabling use of new
type system features on older Python versions.

We don't want to make typing-extensions a runtime dependency, so we add
a guard and only import it when we're `TYPE_CHECKING`.

[1]: https://peps.python.org/pep-0673/
[2]: https://pypi.org/project/typing-extensions/

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2023-02-19 09:55:41 -05:00
clu0 3757637d8c Fix batched multiprocessing being slower on tall matrices (#634)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-02-15 13:14:39 -08:00
Jonas Mueller c85bc7e589 default n_jobs in label issues batched to =1 (#633) 2023-02-13 17:04:55 -08:00
Jonas Mueller 731dd419a1 Support Zarr files in find_label_issues_batched (#632) 2023-02-12 23:59:26 -08:00
Jonas Mueller 8c424d3b0d mypy tpye annotations 2023-02-12 22:06:40 -08:00
Jonas Mueller f4572dc543 bugfix: missing self.n_jobs 2023-02-12 21:31:59 -08:00
clu0 4850050803 label_issues_batched multiprocessing (#630)
4x speedup (48 cores, 10k classes x 1M examples)


Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-02-12 20:25:02 -08:00
Ulyana 6acc7aead1 Clarify rank.py not for multi-label classification (#626)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-02-12 19:45:20 -08:00
Hui Wen 4d2753ae05 Fix KerasWrapper summary method (#631) 2023-02-12 18:40:52 -08:00
Jonas Mueller ac98282dcb add example script for find_label_issues_batched (#629) 2023-02-10 18:29:00 -08:00
Jonas Mueller 686cbf63f1 Method to estimate label issues with limited memory via mini-batches (#615)
Co-authored-by: clu0 <33559427+clu0@users.noreply.github.com>
2023-02-10 16:59:16 -08:00
Ulyana d99788b9de Fixed duplicate issue removal in find_label_issues (#624)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-02-10 08:28:29 -08:00
Jonas Mueller 5f6493f509 fix bug: confidences -> confidence (#623) 2023-02-09 16:33:47 -08:00
Hui Wen 6aaee8332b Create new cleanlab.models module (#601)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2023-02-07 10:03:32 -08:00
Ulyana c191d8781d Fix format compatibility with latest black==23. release (#620) 2023-02-07 10:01:45 -08:00
Ulyana 35d5323479 Fix dictionary type annotation for OutOfDistribution object (#616)
* Also improve params dict default to be None
2023-02-01 20:07:31 -08:00
Curtis G. Northcutt 0c02ec953b Add two methods to filter.find_label_issues (#595)
"low_self_confidence" or "low_ normalized_margin"

Co-authored-by: huiwengoh <45724323+huiwengoh@users.noreply.github.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-31 23:26:20 -08:00
Ulyana 888246e2d5 Improve num_label_issues usage of confident_joint to match find_label_issues (#610)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-27 14:47:02 -08:00
clu0 2b6c56424d 10x speedup in find_label_issues on linux via better multiprocessing (#596)
and bug fixes related to partition vs sort


Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-19 20:14:03 -05:00
unna97 503a57adaf Adding type hints for mypy strict compatibility (#585)
* Handling missing type & docs in cleanlab/token_classification_utils.py 🏷️
    - Added typehints for the cleanlabs/token_classification_utils.py file for mypy strict mode
    - Fixed corresponding docstrings refers #587

* Handling missing type & docs in cleanlab/multilabel_classification.py 🏷️
 - Fixing all errors for mypy strict for the file

* docs(internal): fix "number of new classes" variable in docstring

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2023-01-10 13:46:16 +00:00
Hui Wen 71e21a983a remove temp scaling from ensemble active learning when data has single annotator (#597) 2023-01-09 14:12:19 -08:00
Elías Snorrason 4a5d0653fe Handle missing type parameters for generic type "ndarray" (#587)
* refactor(multi-label): 🏷️ parametrize `NDArray`

A generic type variable, `T`, that represents the precision of a data type.

While the data types for probabilities and scores are identical, it conceptually makes sense to define separate type aliases for each.

`np` is only used in defining the floating data type, which is only used for type hints.

* mention shape of array in the docstring description

+ other clarity improvements

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-07 14:45:50 +00:00
Aditya Thyagarajan 7b589f6d63 updating copyright year to include 2023 (#594) 2023-01-06 21:25:57 -08:00
Ulyana ebadffdebe Use euclidean distance for identifying outliers for lower dimensional features (#581)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-06 21:25:23 -08:00
Hui Wen d911acc7e8 Remove temp scaling from single annotator case (#590)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-06 09:54:01 -08:00
Jonas Mueller fdfb029001 clarify thresholding in issues_from_scores (#582) 2023-01-06 08:55:42 -08:00
Hui Wen 248bb91378 Revamp text tutorial to use cleanlab Keras wrapper (#584)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-01-06 08:53:02 -08:00
Elías Snorrason 27340b0d5f fix(multi-label docstring example): 📝 make score array two-dimensional (#573) 2022-12-23 15:59:23 -08:00
Hui Wen 75bac0a284 Specify Sphinx to order functions by source code order (#571)
also re-order rank.py functions by moving specific types of label-quality scores to be last in file


Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-12-22 09:14:44 -08:00
Jonas Mueller c0b4e58471 multiannotator explanation improvements (#570)
more clarification when to use active learning vs fixed dataset analysis functions
2022-12-22 00:35:18 -08:00
Hui Wen f61469420b Multiannotator Active Learning Support (#538)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-12-21 18:31:24 -08:00
Jonas Mueller f18279856f Update version.py (#550) 2022-12-16 23:32:41 -08:00
Elías Snorrason 0a3344726f chore: 🔥 remove .pylintrc (#564)
flake8 should be used instead
2022-12-13 00:58:22 -08:00
Elías Snorrason 1e8f9ab8b2 Docs: remove double slash in math-mode in EMA docstring (#563)
Fixes #556
2022-12-12 09:07:40 -08:00
Jonas Mueller 3a6f33c1ff typo: probabilites -> probabilities (#557) 2022-12-05 21:36:56 -08:00
Jonas Mueller 7d9a98b0cf black formatting 2022-11-28 01:09:52 -08:00
Jonas Mueller f0226d5f3e increment version to 2.2 2022-11-28 01:04:55 -08:00
Jonas Mueller 8fda383d2d point to find_label_issues in multilabel_classification.py 2022-11-28 00:46:56 -08:00
Anish Athalye 7b87535e48 Remove unnecessary type: ignore annotations (#549) 2022-11-26 14:44:54 +00:00
Anish Athalye 91cb6a7de0 Fix passing of kwargs to get_label_quality_scores (#547)
The functions `_get_consensus_stats` and
`_get_annotator_label_quality_score` take an argument
`label_quality_score_kwargs`, a dictionary of keyword arguments to pass
to `get_label_quality_scores`. When passing a
`label_quality_score_kwargs` dictionary to these functions, using the
unpacking operator is incorrect: that would be an extra level of
unpacking. The _implementations_ of these functions will unpack the
`label_quality_score_kwargs` when calling `get_label_quality_scores`.
This patch fixes the issue and adds a basic regression test.

[skip ci]
2022-11-26 14:41:47 +00:00
Anish Athalye d4fe568024 Fix types to work with latest pandas-stubs (#546)
The latest pandas-stubs (1.5.2.221124) changed the type of
`.apply(f, ...)` such that the function `f` must return either a
`Scalar` or a `Series`. This patch updates the functions to return a
`Series`. Note that this has minimal impact on runtime performance,
because by default, the pd.Series constructor does *not* copy the
underlying data.

[skip ci]
2022-11-26 14:39:33 +00:00
Jonas Mueller a222859569 Improve docs in label error detection methods for classification data + filter/count mypy type annotations (#543) 2022-11-23 23:01:36 -08:00
Jonas Mueller 17a82c32fc Public multilabel quality scores method + softmin aggregation + more tests (#542)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2022-11-23 18:34:43 -08:00
Elías Snorrason 7139a8fd99 Refactor MultilabelScorer helper methods and tests (#540)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-11-20 15:43:23 -08:00
Elías Snorrason 4d0ad6ed04 Fix multilabel_py dimensionality (#535)
* Go from a (2**K,) vector to a (K, 2) matrix of prior probabilities.
2022-11-14 15:19:17 +00:00