文件历史

49 次代码提交

作者 SHA1 备注 提交日期
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
Jonas Mueller faac915740 mv example_models -> experimental 2022-04-07 01:25:03 -07:00
Curtis G. Northcutt c4e84624e9 CleanLearning = Machine Learning with cleaned data (#177)
* CleanLearning = Machine Learning with cleaned data

* Replace lnl instance naming with cl everywhere (CleanLearning)

* replace rp (rank pruning) with cl (clearn learning) everywhere

* Clarifying comments. remove unnecessary newlines. fix spelling err
2022-04-06 17:33:04 -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
Johnson Kuan 6d8102c7f6 Add fix and test for sklearn GridSearchCV with LearningWithNoisyLabels (#153)
* Move _process_label_issues_kwargs to fit method

* Add test for sklearn GridSearchCV with kwargs

* Add comment to test for sklearn GridSearchCV with kwargs

* Change cv=3 for GridSearchCV in test
2022-03-31 19:21:35 -07:00
Johnson Kuan 0f86e7b884 Enable use of find_label_issues_kwargs for hyper-parameter search (#152)
* Move find_label_issues_kwargs dict arg to init() method

* Update tests after moving find_label_issues_kwargs dict arg to init() method.

* Remove blank line

* Cleanup docstring

* add self.find_label_issues_kwargs
2022-03-31 15:11:03 -07:00
Jonas Mueller 1247f165f2 Improve user-control (#149)
* improved language in docs Quickstart

* LearningWithNoisyLabels refactor to improve API flexibility and UX

* fix LearningWithNoisy rare label handling

* additional arg-checking unit tests
2022-03-30 08:18:38 -07:00
Anish Athalye e7f828976f Add explanation that estimators must be clonable (#146)
Inspired by [1] and similar examples. See also: the pull request that
switches from `copy.deepcopy` to `sklearn.base.clone` [2]. Even the
latter calls `sklearn.base.clone(..., safe=False)` on the values
returned by `get_params()`, so the user has to be sure that their model
is correctly clonable, otherwise they may get silently incorrect
behavior.

[1]: https://github.com/cleanlab/cleanlab/issues/87
[2]: https://github.com/cleanlab/cleanlab/pull/144
2022-03-28 15:43:44 -07: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
Anish Athalye 11dff1faf4 Standardize code style to Black (#107)
* Set up Black as the code style

* Migrate code style to Black
2022-03-16 21:27:36 -04:00
Curtis G. Northcutt 8f9f3f5380 Major API change. Introducing Cleanlab 2.0 (#128)
* Refactor modules pruning to filter and latent_estimation to count

* Remove polyplex (research) algorithms from cleanlab

* Create new module rank and move scoring functions to rank.

* Rename test to match new module names

* Fixed error in normalized margin. added ranking for arbitrary psx and labels.

* Remove unused tests and methods. add multi-label support for baseline.

* Move baseline methods to filter and delete baseline module.

* change filter.get_noise_indices to filter.find_label_issues

* Rename baseline methods. fill out docstrings.

* Only require 1 example to be left in each class after removing errors. (instead of 5)

* Remove K as a parameter to count.compute_confident_joint

* Add C_argmax and C_ij methods from CL paper to find_label_issues

* Add warnings for new prune methods and frac_noise. Fix tests.

* Add baseline tests to test_rank_filter and delete baseline test

* Remove inverse_noise_matrix parameter in classification call to find_label_issues

* add todo to update docstring with new ranking functions

* 100% tests pass. add multi-label support for prune_method

* Major NOT-backwards-compatible name changes to most components

* More Major NOT-backwards-compatible name changes

* fixed s -> label mistakes

* Several nomenclature updates from PR feedback. models renamed to example models.

* Remove python2 support across all modules.

* major api changes. psx -> pred_probs. prob_given_label -> self_confidence. testing added.

* enable python version 3.9 for pytorch model.

* ran spellcheck

* ran grammar check

* Update count.py

* Update filter.py

* Update setup.py and ci.yml to no longer support Python 2 and py3.4/5

* Increase test coverage and documentation of rank module methods.

* create utils submodule and move util and latent_algebra

* Rename y everywhere to true_labels, and p(true_label=..)

* Enforce positional arguments in methods. Fully remove py2 support.
2022-03-16 06:52:03 -04:00
Anish Athalye 1e16d7fd76 Merge branch 'anishathalye/copyright-assign' 2022-01-10 06:06:51 -05:00
Anish Athalye 13895791ef Bump copyright year 2021-12-31 11:02:23 -05:00
Anish Athalye 0fc2ddc974 Switch copyright assignment to Cleanlab 2021-12-27 09:59:29 -05:00
Anish Athalye 7e7cdb456f Sync license text
This patch updates metadata in `setup.py` and comments in other files to
clarify that the current license is AGPLv3, as is specified in the
current `LICENSE` file.

This patch also removes the "this agreement applies to this version and
all previous versions" text from the README and code comments, because
it is redundant; the previous code was already released under a _more
liberal_ license, so giving the option of AGPLv3 is not useful (and
perhaps confusing).
2021-12-27 09:43:56 -05:00
Curtis G. Northcutt 37761c2c6e Update classification.py 2021-06-05 21:22:04 -04:00
Curtis G. Northcutt 7023b6baa7 Clean up docstrings for ReadTheDocs 2021-04-19 02:56:45 -04:00
Curtis G. Northcutt ad9543de38 Update cleanlab docs with sphinx_rtd formatting 2021-04-18 18:34:53 -04:00
Curtis G. Northcutt 2aae853888 formatting. remove unused dependency 2021-04-08 22:07:31 -04:00
Curtis G. Northcutt 2945924749 Add copyright 2021-03-03 18:06:07 -05:00
cgnorthcutt 7c909098fb n_jobs is set to max.cpu for all operating systems 2020-02-17 01:56:45 -05:00
cgnorthcutt 30d9e8f884 Bug fix and PEP-8 adherence 2020-02-16 20:32:15 -05:00
cgnorthcutt f2f7a3ce29 Make Windows Python pruning default to 1 process and not use multiprocessing 2020-02-14 15:56:52 -05:00
cgnorthcutt 8a027e539c bug fix: adding missig self 2019-11-10 12:08:17 -05:00
cgnorthcutt 2fc9c5c1a8 bug fix: adding missing quotes 2019-11-10 12:04:23 -05:00
Curtis G. Northcutt 03dc9cc69b bug fix attempt: pulearning --> self.pulearning 2019-11-10 11:51:06 -05:00
Curtis G. Northcutt 775856b63d remove unused import 2019-11-10 11:27:17 -05:00
Curtis G. Northcutt 915eb181d1 fix pulearning 2019-11-10 11:26:32 -05:00
Curtis G. Northcutt 0d546307b0 BUG FIX: Remove unused parameter 2019-09-28 09:11:22 -04:00
Curtis Northcutt e5523e76b2 Correclty format code to avoid empty spaces at 80 char lines 2019-09-03 23:27:29 -04:00
cgnorthcutt 4fc013aaec remove ipynb [ ] artifacts 2019-08-19 18:02:42 -04:00
Curtis Northcutt 8fec809e10 Fixed header comment 2019-07-26 21:34:15 -04:00
Curtis G. Northcutt 41a4081f48 Typo fix in comments 2019-06-20 16:57:33 -04:00
cgnorthcutt 3533b2afc6 Remove all references to prune_count_method and warnings 2019-02-16 00:20:16 -05:00
Curtis Northcutt 18f6150e5c Exclude TODO/pulearning from codecov. 2018-12-06 18:23:52 -05:00
Curtis Northcutt 1fe54b502e Added warnings and comments to clarify prune_count_method. 2018-12-06 18:01:08 -05:00
Curtis Northcutt c1ef76497b Renaming RankPruning alg to LearningWithNoisyLabels 2018-12-03 16:40:32 -08:00
Curtis Northcutt 2c0044db82 Fixed error. renamed self.model to self.clf 2018-11-25 20:19:39 -05:00
Curtis Northcutt 2409c67f93 change confidentlearning to cleanlab 2018-11-25 20:11:00 -05:00
Curtis Northcutt 452271838a Made RP.score() py2 and py3 compatible 2018-11-25 19:25:17 -05:00
Curtis Northcutt 0f558a6997 The RankPruning() class for learning with noisy labels. 2018-11-21 12:39:56 -05:00