文件历史

提交图

77 次代码提交

作者 SHA1 备注 提交日期
Elías Snorrason 15bec56103 Rescale ood scores in outlier package (#953)
Co-authored-by: Ulyana <ulya.tkach@gmail.com>
2024-01-17 17:42:23 +00:00
Elías Snorrason 0a03742f52 Refactor batching logic in cleanlab.segmentation.filter.find_label_issues (#918) 2024-01-08 11:30:25 +00:00
Gibson Han e90dea60c7 702 - Shorten Refs of classes and functions (#831)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: tataganesh <tataganesh95@gmail.com>
2023-12-07 13:37:16 +00:00
Yiran Shi 902fb487c9 Functions to explore object detection dataset (#840)
Add dataset summary functions+plots to object detection.
---------

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Ulyana <ulyana@cleanlab.ai>
2023-10-16 13:17:05 -07:00
Elías Snorrason 4ce9f771c8 Unify softmax implementations (#826)
* unify softmax implementations

* Refine mypy type hint in _set_fine_search_range function

- Update type hint for `min_entropy_ind` from built-in `int` to `np.intp`.
  - This refinement addresses a type compatibility warning.
  - `np.intp` is the integer type used by numpy for indexing and can differ in size from the built-in Python `int` depending on the platform (32-bit vs 64-bit).
  - Mypy highlighted this type hint discrepancy.

* add unit tests for softmax

---------

Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-08-30 00:22:05 +00:00
Aditya Thyagarajan a497b38c28 change thresholding class-wise for ObjectLab (#804)
* Adding support for per-class thresholding for ObjectLab
2023-08-26 05:06:00 +05:30
Hui Wen 0adce8290f 50x speedup for multiannotator module (#821) 2023-08-16 18:39:06 -07:00
Hui Wen b9102017bd Add more descriptive error messages for multiannotator modules (#784) 2023-07-27 14:25:19 -04:00
Aditya Thyagarajan cb51891b06 lowering swap score for multiple labels associated with a box (#750)
* Lower swap scores for overlapping annotations + Optional arguments correction

---------

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Ulyana <ulya.tkach@gmail.com>
2023-07-12 20:29:20 +05:30
Yiran Shi cb4c05cbff Add support for high dimensional arrays in CleanLearning(#749)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-06-27 00:12:52 -04:00
Mayank Kumar 9f302200a4 Regression label quality scores (#572)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: huiwengoh <45724323+huiwengoh@users.noreply.github.com>
2023-06-23 17:51:46 -07:00
Vedang Lad 35606fc401 label error detection in semantic segmentation datasets (#677)
Co-authored-by: Ulyana <ulyana@cleanlab.ai>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-06-23 00:32:08 -07:00
Ulyana da65a9727f identifying label errors in Object Detection data (#676)
Co-authored-by: Aditya Thyagarajan <aditya1593@icloud.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-06-07 01:12:46 -07:00
DerWeh 114201bf76 ENH: make clipping unnecessary for entropy (#703)
Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-05-25 00:49:30 -04:00
DerWeh e33b757fa0 MAINT: standardize documentation and simplify code for outlier (#689) 2023-05-01 19:16:19 -04:00
Elías Snorrason 2d00c91f40 Update numpy.typing import and annotations (#688)
* refactor: ♻️ move numpy.typing under TYPE_CHECKING and add future annotations
2023-05-01 16:58:48 +00:00
Ulyana d45a508ed6 Update softmax to be more numerically stable (#667) 2023-04-14 22:23:40 -05:00
Aditya Thyagarajan f8c1866c58 move methods to multilabel_classification module (#657)
adds new dataset summarization methods for multilabel settings

---------

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2023-04-13 21:50:11 -07:00
Elías Snorrason 6d67175e2a Extract function for computating ood scores from distances (#664)
* extract distance-to-score computation to separate function
* move function to a new internal.outlier module
2023-04-07 18:33:45 +00:00
Hui Wen fa1db6e1d5 Bug fixes + improvements to multiannotator module (#654)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2023-03-20 23:36:41 -07:00
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
Ulyana c191d8781d Fix format compatibility with latest black==23. release (#620) 2023-02-07 10:01:45 -08: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
Aditya Thyagarajan 7b589f6d63 updating copyright year to include 2023 (#594) 2023-01-06 21:25:57 -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 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
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 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
Elías Snorrason 25025d9275 Validate forgetting factor in EMA (#527)
- Added runtime check that `0 <= alpha <= 1` to ensure EMA uses proportional weighting.
- Moved all EMA tests to separate class.
2022-11-07 15:56:33 +00:00
Aditya Thyagarajan f37ba9ff39 support missing classes in multilabel tasks (#523) 2022-11-04 15:00:43 -07:00
Hui Wen 1085faca4a support missing classes in multiannotator functions (#519) 2022-11-03 23:25:03 -07:00
Aditya Thyagarajan cbe3ce0f20 move multilabel functions to utils (#515)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-11-03 10:16:28 -07:00
Jonas Mueller 2bff4d5dd6 Better missing class support for label quality scoring (#518) 2022-11-02 18:14:16 -07:00
Curtis G. Northcutt c2d319d0ed Add support for missing classes (#511)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-10-31 16:23:41 -07:00
Elías Snorrason 8ff371c16c separate word coloring from token-replacement (#514)
Fixes #513
2022-10-31 14:21:05 +00:00
Aditya Thyagarajan b12d76b6d1 Multilabel code restructuring with aggregation/scorer functions (#509)
_find_label_issues_multilabel uses EMA instead of mean-pooling when computing label quality scores

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-10-28 16:26:39 -07:00
Hui Wen 738acae810 Point to format label function for multiannotator (#506) 2022-10-25 10:52:21 -07:00
Hui Wen f8a831d239 Add internal function to properly format labels (#504) 2022-10-24 10:54:59 -07:00
Aditya Thyagarajan e060f551fb supporting multilabel via one-vs-rest reductions (#483)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-10-17 12:09:23 -07:00
Elías Snorrason 26fa264344 Extending label quality scores to multilabel data (#499)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-10-13 09:56:43 -07:00
Mohit Saxena 57adf33369 Adding pylint CI checks (#465)
* Update ci.yml

* remove unused import

* 💚 merge pylint jobs

* 🔧 add .pylintrc

* 🚨 handle pylint errors

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2022-09-23 16:10:03 +00:00
ethanotran 1d33ea8b3c let label_quality_utils docstrings type be autogenerated [include in 2.1 docs] (#475) 2022-09-22 14:34:27 -07:00
Hui Wen 06ed233a25 Error handling for rare classes (#455)
* error handling for rare classes

* change subtract to symmetric difference

* remove extra np.unique

* add warning for all instances of getting consensus labels

* error checking edits

* Add typing

Co-authored-by: Elías Snorrason <eliassno@gmail.com>

* black formatting

* update typing - labels_multiannotator will always already be converted to pd.dataframe

* make pred_probs options in typing

* add =None

* docstring edits

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>

* add basic docstring

* Changed to verbose

* Removed unessesary calculation out of get_labels_quality_m

* Update cleanlab/multiannotator.py

* comment for lost classes check so it can be grepped

* caution about setting verbose to false

* advise against verbose=false in docstring

Co-authored-by: Elías Snorrason <eliassno@gmail.com>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Ulyana <ulyana@cleanlab.ai>
2022-09-16 19:26:29 -07:00
Jonas Mueller a4ad6460a2 Format return docstrings and add typing (#437)
* typing and return docstrings

* address typing complaints

* allow redefinition

* typing complains for pandas

* .values -> to_numpy()
2022-09-15 11:46:14 +00:00
Elías Snorrason fd50f6b9c6 Deploy docs for token classification module (#438)
* docs: 📝 add usage example for get_sentence

Also remove types in docstrings.

* docs: 📝 add usage examples for filter_sentence

* docs: 📝 add page for internal.token_classification_utils

* docs: 📝 remove name of return variable

auto-tagging won't work correctly for the return value if it's not a tuple

* 📝 add pages for modules in cleanlab.token_classification

* fix indentation

* 📝 add token classification api to toctree

* 🎨 format docstrings

* 📝 add usage examples

* update example comment

* 📝 add usage examples

* 📝 add return variable name in docstring

* 📝 remove some hard-coded params types in rank module

Keep more complex parameters hard-coded for now. E.g. "enum"-like parameters.

* 🎨 remove indentation of parameters in docstrings

* 🎨 fix indentation

* colored docstring typo + formatting

* typo: occurence

* probs_merged docstring typo + formatting

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-09-14 14:59:26 -07:00
Jonas Mueller 23067aa9c6 Headers for newly added modules (#409)
* header for multiannotator module

* header for outlier module

* header for token_classification.filter

* header for token_classification.rank

* header for token_classification.summary

* header for util

* header for latent_algebra

* header for label_quality_utils

* header for token_classification_utils

* header for huggingfacekerasclassifier

* add experimental modules' dependencies to readme
2022-09-08 09:20:26 -07:00
Ulyana 9dfa001068 Implementing get_ood_scores function (#338)
* Added base structure outline for get_ood_scores()
Added base test for get_ood_scores()

* Added warning for illogical param combo

* Addressed PR comments

* Added better unit tests
* TODO: test for correctly identifying OOD example

* Moved logic from get_ood_scores to _subtract_confident_thresholds

* TODO: Is this a cleaner way of doing this? Minimal code repeat but strange change to _subtract function
* Addressed type issue

* Switched logic for getting confident thresholds

* Fixing typecheck issues wiht labels parameter being None

* Simplified helper function. Testing type

* Fixed mypy static typing issue

* Mypy typecheck logic test

* removed uncessesary imports in util file

* typechecker debugging (add assert)

* Fixed type logic and removed confident_thresholds=None return

* Added extra arg in helper func to end of func

* Added zero-index checking for label param

* Added ood examples to outlier score notebook

* Added skeleton file structure for implementing outliers

* Make adjust_pred_probs=True by default not false

* Added base Outlier class functionality

TODO:
* test_outlier.py

* Added logic tests for function

* Updated get_ood_scores to always return confident_thresholds
* Even if none were calculated (then return is None)

* Added warning for fit that doesn't calculate confident_thresholds

* Moved get_outlier_scores and get_ood_scores to outlier.py

* Changed param dicts to dicts

* Added docstring to outlier.py

* Added proper return types

* Fixed mypy typing issues

* Switched outliers -> features; ood -> predictions naming conv

* Switched docstring to stem from fit and score functions

* Changed return of helper functions

* Fixed tutorials notebook to use OutOfDistribution class

* Moved imports to top of file

* Added option for different knn objects, addressed pr comments

* Switched params arg to init only

* Addressed PR comment for notebook, cleared notebook

* Fixed PR comments, wording.

* Testing relative links on build

* Changed ood_pred_probs scores to reflect 0 = most ood 1 = least

* Added MLP for detection outliers with pred_probs

* Fixed typos

* Added MLP Import

* Improved warning when fit call unnecessary

* Changed referenced to params dict in warnings/errors

* Added bagging+MLP classifier into notebook

* Reverted tutorial wording

* OOD tutorial improvements

* cleanup OOD documentation

* adopting->using

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-09-07 10:52:55 -07:00