文件历史

提交图

17 次代码提交

作者 SHA1 备注 提交日期
Jonas Mueller 0167accd0a license (#1263)
change license to Apache 2.0

---------

Co-authored-by: Anish Athalye <me@anishathalye.com>
2025-12-15 16:56:30 -08: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
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
Aditya Thyagarajan 7b589f6d63 updating copyright year to include 2023 (#594) 2023-01-06 21:25:57 -08: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
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
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
Ulyana c0fe76c098 Changed all docstring instances of np.array to np.ndarray (#336)
* Changed all instances of np.array in docstring to np.ndarray

* np.array is NOT a proper class name it is just a function to
  create np.ndarrays and therefore should not be parameter class

* Black formatting compliance
2022-08-08 23:30:12 -07:00
Jonas Mueller 9c543c6cba error for missing classes, consistency on determining num_classes, code cleanup (#308)
* edge cases

* unique_classes in get_confident_thresholds
2022-07-12 14:45:20 -07:00
Anish Athalye 0705ff2d0a Add static type checking
Our package doesn't have type annotations everywhere, so we can't use
mypy in strict mode just yet. Still, adding type checking in CI is
valuable, so we don't have unchecked annotations in our code.

This patch includes basic fixes to make type checking pass, including
switching the incorrect `np.array` type annotation for `np.ndarray` and
adding some assertions for flow-sensitive typing.
2022-07-06 17:21:56 -04:00
Curtis G. Northcutt 5bbea05992 Replace shape (N,) with (N, ) everywhere 2022-06-20 10:30:12 -07:00
Curtis G. Northcutt 7aa34a33ba Fix bug. get thresholds broken for multi_label 2022-05-20 21:55:32 -04:00
Jonas Mueller d1a4bc86fd Returns DataFrame type from CleanLearning functions (#199)
* df return type, need tests still

* Add pandas as a dependency

We already decided that pandas will be a dependency of cleanlab (also
used in the dataset module, see
https://github.com/cleanlab/cleanlab/pull/182).

* Tweak documentation

* addressed comments

* remove lazy import

* address 2nd round comments

* unit tests

* improve codecov

* Fix typo

* methods to save more space

* nocover statements for prints

* extra nocover

* nocover warnings

* test docstring formatting

* test docstring formatting2

* test docstring formatting2

* move compress to helper, find-label docs params

* readded stuff lost in merge conflict

* addressed remaining PR review comments

* docs formatting

* docs formatting2

* docs formatting3

* docs formatting4

* docs formatting5

* docs formatting5

* docs formatting6

* docs formatting7

* docs formatting8

* docs formatting9

* docs formatting19

* docs formatting20

* docs formatting20

* docs formatting21

* code formatting

* fix a bug where confident joint isnt computed

The confident joint wasn't getting computed if noise_matrix was passed in and pred_probs was not passed in. But that's bad because it stops workflows like:

```python
cl = CleanLearning()
cl.fit(data, labels, noise_matrix=noise_matrix)
cleanlab.dataset.health_summary(labels, confident_joint=cl.confident_joint)
```

* fixed bug from last commit. code in wrong place.

* print overwrite bugfix

Co-authored-by: Anish Athalye <me@anishathalye.com>
Co-authored-by: Curtis G. Northcutt <curtis.northcutt@gmail.com>
2022-04-13 16:00:41 -04:00
Anish Athalye 8de8340313 Add link checking for compiled docs 2022-04-07 10:33:15 -04:00
Jonas Mueller 7b2340b638 Utilites -> internal submodule refactor (#141)
* utilities -> internals

* docbuilding instructions improvement

* fixup formatting of contributing.md

* change contributor guidelines language to be optional

* line formatting
2022-03-28 09:53:10 -07:00