提交

提交图

1485 次代码提交

作者 SHA1 备注 提交日期
Ulyana b481a74d0d Updated tutorials to include quickstart (#323)
* Added runnable package versioning for tutorials
Added quickstart at top of tutorials

* Addressed PR comments
* Fixed quickstart to include cleanlearning
* Set correct requirements.txt
* Updated y to labels

* Fixed y-> labels labeling issues

* Updated quickstart message/removed extra dependencies

* remove keras from package-versions

* more concise

* remove pathlib as explicit requirement

* remove pathlib version

* rewording

* true label -> given label

* remove venv from kernelspec

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-07-26 00:52:13 -07:00
Jonas Mueller d8a207b971 remove broken links 2022-07-25 22:55:27 -07:00
Jonas Mueller 571f29ddcd model accuracy -> label error detection performance 2022-07-25 21:22:10 -07:00
Jonas Mueller 268e43e6ee Some FAQ tips on how to improve CleanLearning (#324)
* cleanlearning tips

* addessed comments

* add a few general tips at the end

* minor edits

* format pred_probs as variable type

* bug fix to pass lint (missing comma)

* fix format for linter

Co-authored-by: Curtis G. Northcutt <curtis.northcutt@gmail.com>
2022-07-25 21:12:50 -07:00
Jonas Mueller a0e1227ae5 Allow KNN object to be returned by get_outlier_scores, Improved Tutorial (#319)
* knn return, improved tutorial

* typing fix for tuple

* add timm to docs-requirements

* language improvements

* declare typing of outlier_scores
2022-07-25 12:40:58 -07:00
Jonas Mueller 5973a21958 revert links from master -> v2.0.0 2022-07-23 16:46:34 -07:00
Aravind Putrevu 85ca7302a9 Updating tutorials hyperlink to 2.0.0 release (#318)
* Updating tutorials hyperlink to 2.0.0 release

* revert back to v.2.0.0 links instead of stable

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-07-23 16:36:01 -07:00
Jonas Mueller a18d4d2c71 patch missing timm in docs-requirements 2022-07-23 15:52:18 -07:00
Jonas Mueller 31545f1e5c More guidelines added to docs readme (#321)
* point to tutorial guidelines

* things not to forget for new tutorials

* docstring editing guidelines
2022-07-23 15:49:29 -07:00
Jonas Mueller 008ad080db Tips for editing the tutorial notebooks (#320)
* docs editing tips
2022-07-22 18:17:55 -07:00
Ulyana b8e85284c6 Added outlier detection tutorial into docs (#310)
* Added outlier detection tutorial into docs

* Switched to pytorch model/dataset implementation

* Fixed image normalization

* Fixed outlier detection for test set

* Added outlier thresholding into tutorial.

* Cleaned output

* Removed unused imports and renamed notebook

* Added outliers notebook to PR

* Added quickstart into tutorial

* Best quickstart header

* Cleaned cell output

* Changed to use subset of original data for speed

* Fixed randomness

* Cleared outputs

* fixed metadata tags

* Fixed metadata

* Cleaned kernel and verified output

* Improved unit test
Changed labels references to classes where apropriate
2022-07-22 15:40:03 -07:00
Curtis G. Northcutt af9902ace9 improve use experience remove link to tutorials (#316)
The previous link took you to a tutorials page with lots of options including tutorials that were for data-centric AI workflows, and computing cross validated probs, etc. if this is supposed to be the very first thing users click on to get started, we want it to take them straight to a place where they can get started in 5 minutes, not a list of things where they have to figure out what to click next.

Updated to fix this, which also reduced the length :)
2022-07-21 15:06:37 -07:00
Jonas Mueller a4f51327db fix KNN default k-value bugs (#315) 2022-07-21 15:00:51 -07:00
Jonas Mueller ffbe47835e update slack link (#313)
* update slack link

* slack links in docs

* slack link in ISSUE_TEMPLATE
2022-07-20 18:31:39 -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
Ulyana fef76ba357 Added support to build KNN graph with only training data (#305)
* Added support to build KNN graph with only training data
- Added default classifier for get_knn_distance_ood_scores()

* Added unit test for checking default KNN model is used when nbrs=None

* Changed default num neighbors from 10 to K.

* Changed unit test to check score sums

* Fixed k=15

* Added support to build KNN graph with only training data

- Added default classifier for get_knn_distance_ood_scores()

- Added unit test for checking default KNN model is used when nbrs=None

- Changed default num neighbors from 10 to K.

- Changed unit test to check score sums

* Improved code readibility, extended unit test to check for default k

* Changed naming convention from get_knn_distance_ood_scores to get_outlier_scores

- Changed nbrs to knn
- Improved unit test readability

* Made unit test more robust to check if user-set value is passed

* changed classifier -> estimator
* fixed test warning handle

* Updated function headers to better definition

* Improved header writing added functionality to avoid training/testing with identical features

* Updated docstring, updated handling of features=None and test for it

* Added ValueError for k>len(features) and test to catch ValueError

* Updated argument types to Optional, added runtime typecheck.

* Added unit test to check TypeError

* Changed Exception type thrown when knn=None, features=None

* TypeError to ValueError

* Reversed scoring for outlier severity
* Added test to check t parameter
* Added t parameter for global rescaler

* Improved function definition concerning 't' parameter

* Fixed tests
* Removed repeated calls
* Added assertion to make sure X_ood is always smallest outlier score

* Improved logic for checking X_ood has the smallest score
2022-07-14 10:36:10 -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
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
Ulyana 36bfddc354 Added 4 more FAQs to faq doc (#303)
* Added new questions in FAQ

* Added 4 other FAQs

* language / code-format edits

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-07-01 18:01:48 -07:00
Ulyana f7328e8b67 Created FAQ Page in the Cleanlab documentation (#294)
* Create FAQ page in cleanlab docs

* Add FAQ notebook to store answers to frequently asked questions

* Improved formatting issues for faq page

- added faq to sidebar

* Improved formatting issues for faq page

- added faq to sidebar
- changed email to comply with CLA

* Removed faq numbering

- Removed notebook output metadata
- Added notebook to index for left table link

* Text and example rewritten for clarity

- How do I format labels for cleanlab-- example improved
- How do I format labels for cleanlab-- text amended
- Can't find an answer to your question-- added links

* add links to issues/slack

Co-authored-by: Ulyana Tkachenko <uly@ulyana.lan>
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-06-29 10:24:50 -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
Ulyana Tkachenko 942d97e5b8 Updated docs/README to suggest wget install for macOS (#293)
* Update docs/README to require wget install for Mac
2022-06-27 22:25:47 -07:00
Jonas Mueller 4bd688f51c update tf_io and hf_hub versions (#291) 2022-06-24 06:51:58 -07:00
Jonas Mueller 69551fbd38 downgrade tensorflow-io (#290)
https://github.com/tensorflow/io/issues/1687
2022-06-24 06:05:03 -07:00
Jonas Mueller c8701485ba downgrade huggingface_hub version (#289)
https://github.com/speechbrain/speechbrain/issues/1459
2022-06-24 05:45:28 -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
Anish Athalye 5e0b62d797 Drop dependency on SciPy (#286)
We aren't actually using SciPy within the cleanlab package, only in
tests.
2022-06-20 21:48:38 -07:00
Curtis G. Northcutt af11106e77 Clarify labels format (#282)
Add clarification of the labels format requirements for all major API functions.

* Fix broken link

* Clarify reqs for labels format. rank.py does not yet support multi_label

* add double ticks to code in docstrings

* clarify docstring

* further clarify multi_label vs single label labels reqs

* also add new docstring to confident joint
2022-06-20 12:58:24 -07:00
Curtis G. Northcutt 29026b48f9 Add common variable names. 2022-06-20 11:53:24 -07:00
Curtis G. Northcutt 28a1a7aa0e Merge pull request #264 from cgnorthcutt/fix_thresholds_multilabel
Fix bug. get thresholds broken for multi_label
2022-06-20 11:10:53 -07:00
Curtis G. Northcutt eb54447901 Change shape (N, ) back to (N,) to adhere to numpy standard 2022-06-20 11:10:00 -07:00
Curtis G. Northcutt 25036dc48e clarify expectation for labels 2022-06-20 10:32:28 -07:00
Curtis G. Northcutt 5bbea05992 Replace shape (N,) with (N, ) everywhere 2022-06-20 10:30:12 -07:00
Curtis G. Northcutt 1f40bdcd67 clarify all labels must be present in docstring 2022-06-19 16:00:51 -07:00
Curtis G. Northcutt 670d9d680e use shape[1] instead of unique everywhere. replace K with num_classes 2022-06-19 15:56:13 -07:00
Curtis G. Northcutt fc0db77892 remove unused code and unused param in docstring 2022-06-19 15:46:52 -07:00
Curtis G. Northcutt 215945f690 Remove redundant code. replace unique with pred_prob shape 1 2022-06-19 15:45:29 -07:00
Jonas Mueller b970496a0f update slack invite link (#280)
* update slack invite link
2022-06-19 15:08:10 -07:00
Jonas Mueller f918b82d80 Provide example label formats in tutorials (#279)
* example label formatting

* example label format in text tutorial

* example label format for tabular tutorial

* y -> full_labels

* example label format for audio tutorial

* clarify input shapes in image tutorial

* clarify input shapes in text tutorial

* clarify input shapes in tabular tutorial

* clarify input shapes for audio tutorial
2022-06-16 11:41:56 -07:00
Anish Athalye 07c8ce655d Add issue templates (#278) 2022-06-14 14:49:18 -07:00
Jonas Mueller 1f1d02435d overlapping_desc (#277) 2022-06-14 11:29:39 -07:00
Jonas Mueller 7d498a8c39 black formatting (#273) 2022-06-10 10:43:27 -07:00
Jonas Mueller 673c117ba7 code formatting (#271)
* code formatting

* codecov ignore experimental/*
2022-06-10 10:37:22 -07:00
Jonas Mueller d7e9e4b073 docstring clarifications (#270) 2022-06-10 10:36:23 -07:00
Johnson Kuan d902197191 Add KNN distance OOD scoring function and unit tests (#268)
* Add KNN distance OOD scoring function and unit tests

* Update KNN distance OOD scoring function

* Change query_features to features in unit tests for KNN distance OOD scoring function

* Update KNN distance OOD scoring function

* Update tests for KNN distance OOD scoring function to use auto for algo

* Allow k=None for KNN Distance OOD score
2022-06-01 17:14:32 -07:00
MattiaSangermano e1ba5ae25f Developed class that allow the use of cleanlab with tensorflow and huggingface models (#247)
* added class to use cleanlab with tensorflow and huggingface models

* - Documentation refactoring
- predict and predict_proba functions work on new test data too
2022-06-01 17:02:29 -07:00
Johnson Kuan 04877081f3 Add Negative Log Loss Weighting Scheme for Ensemble Label Quality Score (#267)
* Add log_loss_search weighting method for ensemble label quality scoring function

* Update log_loss_search weighting method

* Add test for log_loss_search method

* Add parameter to Ensemble label quality scoring function for t values in log_loss_search method

* Update ensemble label quality scoring function docstring

* Update ensemble label quality scoring function comments

* Update docstring in ensemble label quality scoring function

* Update docstring in ensemble label quality scoring function

* Update docstring in ensemble label quality scoring function

* Modify verbose printout for log_loss_search

* Add clipping of pred_prob when calculating weights for log_loss_search

* Add clipping of pred_prob and renormalization when calculating weights for log_loss_search

* Add comments for log_loss_search weighting scheme
2022-05-26 16:55:04 -07:00
Wei Jing 6a810d0027 Instructions to manually add docs' build artifacts (#234)
* add instructions to manually add docs readme

* fix cloning url and replacement step
2022-05-26 11:51:42 -07:00
Anish Athalye 25b5a95c95 Upgrade to latest version of coverage (#262)
The issue that was introduced in coverage 6.3 has been fixed:
https://github.com/nedbat/coveragepy/issues/1310#issuecomment-1129894701.
We can't just upgrade to `coverage` or `coverage>=6.4` because the
former could install bad versions of coverage (e.g. 6.3), and the latter
is unsupported on Python 3.6, which we want to continue supporting.

This patch just bans coverage 6.3 / 6.3.x, so with Python 3.7+, we'll
use the latest version of coverage, and with Python 3.6, we'll use the
latest supported version of coverage that's not a 6.3 release.
2022-05-24 23:21:48 -07:00