文件历史

提交图

91 次代码提交

作者 SHA1 备注 提交日期
Ulyana 0ca61629ac remove tensorflow 2026-01-08 14:02:17 -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
Jonas Mueller a02093bf15 Move models.fasttext wrapper to examples repo (#1173) 2024-07-08 22:10:52 -07:00
Elías Snorrason c72f0c2cdf Remove deprecated multi_class argument in LogisticRegression and skip test for sklearn 1.5.0 regression (#1124) 2024-05-24 19:48:04 +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
Tata Ganesh d37a7d8d85 Expose low memory option for token and multi-label classification (#822) 2023-08-23 01:14:29 -04:00
Tata Ganesh 83731599be Expose low memory option for finding label issues in classification (#791) 2023-08-11 00:35:51 -04:00
Hui Wen afdb667501 change inspect.getfullargspec to signature in CleanLearning (#761) 2023-07-05 11:44:43 -07: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
Jonas Mueller d3302c074e include n_jobs in cleanlearning kwargs docstring (#744) 2023-06-12 21:09:53 -07:00
Hui Wen 72d4595ab8 Delete repeated lines in CleanLearning.save_space (#724) 2023-05-19 16:47:28 -04:00
Hui Wen 64c6cfcdd5 Pass confident joint computed in CleanLearning to filter.find_label_issues (#661) 2023-04-05 21:21:17 -07: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
Ulyana c191d8781d Fix format compatibility with latest black==23. release (#620) 2023-02-07 10:01:45 -08:00
Aditya Thyagarajan 7b589f6d63 updating copyright year to include 2023 (#594) 2023-01-06 21:25:57 -08: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
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
Anish Athalye 7bfdd9169d Make type checking pass with mypy 0.981 (#488) 2022-10-05 17:42:11 -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 8323a0f0ac explain pred_probs vs clf 2022-09-06 22:13:58 -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
Elías Snorrason cecaf7aec6 Add y argument as alternative to labels in CleanLearning.fit() (#322)
* 🗑️ change labels arg -> y in CleanLearning.fit()

Set `label` as an optional keyword-only argument.
Anyone still using it in this method should get a deprecation warning.

Fixes #281

* 📝 add note for y/labels in docstring

* 🥅 make y an optional positional arg.

Should now resolve deprecated signatures.

* 📝 labels -> y in module docstring

*  revert "label -> y deprecation"

This reverts commit ab319a0cca2cec715a84eb5f628bbab7706c5f9c.
This reverts commit 1b739002d848e1f0acb6390a666f6e695e25fcaa.
This reverts commit 88bb6c3bcca298dab414c3cb20101783d78d35d1.
This reverts commit d988e3c3932107e779598d02d8f16d7e6671e9e7.

*  add y alias for labels

Resolves #281
2022-07-26 00:59:10 -07:00
Hui Wen 6c6c13664e Standardize naming on K, num_classes and N, num_examples (#312)
* update N in classification.py

* minor docstring changes on K-1 classes

* use K in shape

* minor grammar fixes

* docs language improvements

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-07-18 18:50:17 -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
Hui Wen f62bc36e54 Allow CleanLearning to use validation data in each fold (#295)
* allow CleanLearning to use val data in each fold

* add unittest for using val data in CleanLearning
2022-06-28 22:04:22 -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
Jonas Mueller 42971ac08b nocover verbose prints 2022-05-04 20:02:41 -07:00
Jonas Mueller 8593018b46 nocover final else+print statement 2022-05-04 19:41:37 -07:00
Jonas Mueller 46b8ca310f remove weight from clf_kwargs 2022-05-04 03:24:58 -07:00
Jonas Mueller 4b1ebbc435 dict copy to avoid update 2022-05-04 03:09:13 -07:00
Jonas Mueller d4873631e4 _default -> _auto 2022-05-04 02:24:31 -07:00
Jonas Mueller 7ec5c9190a 2nd bugfix: sample_weight_default 2022-05-04 02:20:56 -07:00
Jonas Mueller c795a36b8b bugfix: sample_weight variable and arg name 2022-05-04 02:05:32 -07:00
Jonas Mueller fc033ddc80 move back cannot-utilize weights print 2022-05-04 01:40:35 -07:00
Jonas Mueller 848bc964ff refactor and simplify code 2022-05-04 01:21:01 -07:00
Jonas Mueller 95fb15babe missing colon 2022-05-04 00:51:11 -07:00
Jonas Mueller fe59bc630c minor fixes 2022-05-04 00:45:44 -07:00
rushic24 8436cf8d12 move noise_matrix check 2022-05-03 17:30:05 -04:00
rushic24 1fe76736ce restructured 2022-05-03 17:23:18 -04:00
rushic24 d99b5b7c16 added custom sample_weight 2022-05-02 00:08:41 -04:00
Yulv-git aede5bd7db Fix some typos. (#242) 2022-04-23 12:17:20 -04:00
Jonas Mueller b8b6623c1d Merge pull request #203 from anishathalye/doc-fixes
Make minor doc tweaks
2022-04-13 20:11:23 -07: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
Anish Athalye b305b417ad Make minor doc tweaks 2022-04-13 20:28:21 -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 5cf8f74232 Switch to pseudocode math over LaTeX math
In most cases, this looks nicer than the LaTeX math, and it's also more
readable in the terminal.
2022-04-09 08:47:46 -04:00
Anish Athalye 4f717c8d8f Have find_label_issues summarize what it does
Thanks @jwmueller:
https://github.com/cleanlab/cleanlab/pull/189#issuecomment-1093652195.
2022-04-09 07:33:24 -04:00
Anish Athalye 133fcc452e Revise classification 2022-04-09 07:33:24 -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