文件历史

提交图

32 次代码提交

作者 SHA1 备注 提交日期
Ulyana 9ec8da7a70 Remove TensorFlow integration (#1273) 2026-01-06 16:48:49 -08:00
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
Martin Zornoza Auñon c915f77642 Improve performance of clip_values utility function(#1104) 2024-07-02 15:08:20 +00:00
Martin Zornoza Auñon e67c4aeedd Optimize internal clip_noise_rates and remove_noise_from_class functions (#1105) 2024-07-02 15:06:02 +00:00
Martin Zornoza Auñon c13f32a2a6 Optimize value_counts function for performance improvement with missing classes (#1073)
Co-authored-by: Elías Snorrason <eliassno@gmail.com>
2024-05-21 21:30:33 +00:00
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
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
Elías Snorrason 0a3344726f chore: 🔥 remove .pylintrc (#564)
flake8 should be used instead
2022-12-13 00:58:22 -08: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
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
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 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
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
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 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 b93fdebf30 Add compatibility for tensorflow and pytorch Dataset objects (#311)
* validation_func docstring

* torch,tf compatibility+tests

* keras test

* skip tests if python < 3.7

* pytorch numpy int bug on windows

* make tensorflow test work on windows

* move tf env variable setting

* pytorch test increase epochs

* install cpu-tensorflow on windows CI

* torch test optimizer to adam

* fix bugs in shuffled TF dataset

* dummy unit test for TF on windows

* dummy code for TF windows testing

* deal with np.int bug on windows

* remove windows debugging code

* docstrings for new functionality

* address merge conflicts

* reformat after merge

* addressed comments
2022-07-27 21:42:13 -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
Jonas Mueller 0163751192 Proper validation of labels values/format across package (#301)
* better checks and code

* O(1) pred_probs check, suppress cleanlearning print

* fix verbose docstring default
2022-07-01 23:53:30 -07:00
Jonas Mueller ffd6fc1b35 Make CleanLearning work with pandas and other non-numpy feature objects X (#285)
* cleanlearning w dfs

* work for sparse matrix as well

* simplify logic of labels_to_array and extend types

* address pr feedback

* add unit test

* rare label dataframe

* modularize subsetting code

* series rarelabel test

* replace cal.com with slack/email

* Add general method to find num_classes from labels

* compute num_classes with pred_probs.shape[1]

* fix broken commits, address 2nd round of comments

Co-authored-by: Curtis G. Northcutt <curtis.northcutt@gmail.com>
2022-06-24 04:01:55 -07:00
Curtis G. Northcutt e971350795 Clarify and fix several docstrings. (#214)
* Clarify and fix several docstrings.

* Adjustments based on Jonas's comments.

* fix typo
2022-04-15 19:06:45 -04:00
Curtis G. Northcutt fac6c112aa health_summary bug fixes + notebook support (#212)
* bug fixes and jupyter notebook support added

* Increase test coverage.

* Fix bug. will always try to display if possible.
2022-04-15 14:54:00 -04:00
Curtis G. Northcutt a3b5da6306 fix broken printing of matrices (#207) 2022-04-14 01:08:49 -04:00
Curtis G. Northcutt 08d7f2cdc6 Make fit(verbose) default False. Fix minor bugs. fix black and urls (#204)
* set verbose defaulat false. fix order of printing

* add newline for black format compliance

* fix broken url links in readme
2022-04-13 21:23:01 -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 49b3717edc Make coarse-grained pass over docs
This patch fixes many of the egregious issues with docs rendering.
2022-04-09 07:33:24 -04:00
Jonas Mueller d3eb08e75a added LearningWithNoisyLabels.find_label_issues instance method (#157)
* added LearningWithNoisyLabels.find_label_issues instance method

* LNL.find_label_issues no longer memoizes

* verbose unit test coverage

* Fixed all issues in PR. Fixed confident joint usage in LNL.find_label_issues. Fixed other minor bugs. Added tests

Co-authored-by: Curtis G. Northcutt <curtis.northcutt@gmail.com>
Co-authored-by: Anish Athalye <me@anishathalye.com>
2022-04-06 12:24:27 -04:00
Anish Athalye 5e50623032 Remove unnecessary version warning (#162)
This was used to skip e.g. importing PyTorch on some tests. However,
PyTorch supports all versions of Python that Cleanlab supports, so
there's no need to issue this warning. Furthermore, having this kind of
code in our codebase increases maintenance burden and contributes to
user frustration. If we mark a version of some library as unsupported,
but the library adds support for it in the future, there's no way users
can use the two packages together without waiting for us to push a new
version of cleanlab that marks that it's compatible and then switching
to the new version, which may be painful for unrelated reasons. It's
better to not have these kinds of checks; if users are using a version
of Python that's unsupported by some other library that they want to
use, that's not our problem, and they'll have issues installing or
importing it and figure it out themselves.

This patch also removes mentions of Python 2.
2022-04-05 18:59:58 -04:00
Anish Athalye aec6734902 Allow n-dim data in LearningWithNoisyLabels
LearningWithNoisyLabels used `sklearn.utils.check_X_y` to enforce that
`X` was 2D, to be in line with what sklearn's standard estimators
expect. However, LearningWithNoisyLabels is dataset-agnostic: it doesn't
look at the data points themselves. If the underlying classifier
supports data in a different shape, there's no reason
LearningWithNoisyLabels should prohibit it. Users have requested that we
relax this unnecessary restriction [1] so LearningWithNoisyLabels will
more naturally support e.g. image datasets and CNN models.

Thanks to @kothari1997narayan for suggesting this change.

[1]: https://github.com/cleanlab/cleanlab/issues/86
2022-03-29 00:16:40 -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