You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Create contrib folder and move old examples there. Update remaining examples in root to work with Cleanlab 2.0. Update README with table of contents, description for each example, and instructions. Add requirements file.
* Update README
* Update v1 README
* Update requirements.txt
* Update requirements.txt
* Update README
* Update README
* Update notebooks and run_all_notebooks.py script
* Update README
* Cleanup docstring
* Update README. Change format of header for classifier_comparison.ipynb.
* Update README
* Rename LearningWIthNoisyLabels to CleanLearning everywhere
* Update requirements
* Change cleanlab.filter.keep_at_least_n_per_class to _keep_at_least_n_per_class()
* Add example for cifar CNN and coteaching experimental modules
* Update README
* Update README
* Update README
* Update README
* Update README
* Raise ValueError if epochs < num_gradual for coteaching
* Add example for cleanlab.experimental.mnist_pytorch
* Update README.md
* Add example for fasttext
* Change cleanlab.noise_generation to cleanlab.benchmarking.noise_generation
* Rename cleanlab.util to cleanlab.internal.util
* Cleanup README
* Add relative links to table in README
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Update README.md
* Change column name to "Example" in README table
* Create separate cuda_requirements.txt file for examples that require GPU for training
* Update all README
* Update all README
* Update README to recommend use of latest stable cleanlab release
* Update README
* Update all README
* Update docs link to use v2.0.0
* use stabler links
Co-authored-by: Jonas Mueller <[email protected]>
Not sure where to start? Try checking out how to find [ImageNet Label Errors](imagenet/imagenet_train_label_errors.ipynb).
3
+
This repo contains code examples that demonstrate how to use [cleanlab](https://github.com/cleanlab/cleanlab) and how [confident learning](https://arxiv.org/abs/1911.00068) works to find label errors.
4
4
5
+
To quickly learn the basics of running cleanlab on your own data, we recommend first starting [here](https://docs.cleanlab.ai/) before diving into the examples below.
5
6
6
-
A brief description of the files and folders:
7
-
*`imagenet`, 'cifar10', 'mnist' - code to find label errors in these datasets and reproduce the results in the [confident learning paper](https://arxiv.org/abs/1911.00068). You will also need to `git clone`[confidentlearning-reproduce](https://github.com/cgnorthcutt/confidentlearning-reproduce).
8
-
-[imagenet_train_crossval.py](imagenet/imagenet_train_crossval.py) - a powerful script to train cross-validated predictions on ImageNet, combine cv folds, train with on masked input (train without label errors), etc.
9
-
-[cifar10_train_crossval.py](cifar10/cifar10_train_crossval.py) - same as above, but for CIFAR.
10
-
*`classifier_comparison.ipynb` - tutorial showing `cleanlab` performance across 10 classifiers and 4 dataset distributions.
11
-
*`iris_simple_example.ipynb` - tutorial showing how to use `cleanlab` on the simple IRIS dataset.
12
-
*`model_selection_demo.ipynb` - tutorial showing model selection on the cleanlab's parameter settings.
13
-
*`simplifying_confident_learning_tutorial.ipynb` - tutorial implementing cleanlab as raw numpy code.
14
-
*`visualizing_confident_learning.ipynb` - tutorial to demonstrate the noise matrix estimation performed by cleanlab.
| 1 |[iris_simple_example.ipynb](iris_simple_example.ipynb)| Use cleanlab to find synthetic label errors in the Iris dataset. |
14
+
| 2 |[classifier_comparison.ipynb](classifier_comparison.ipynb)| Demonstrate how cleanlab can be used to train 10 different classifiers on 4 dataset distributions with label errors. |
15
+
| 3 |[model_selection_demo.ipynb](model_selection_demo.ipynb)| Perform hyperparameter optimization to find the best settings of cleanlab's optional parameters. |
16
+
| 4 |[simplifying_confident_learning_tutorial.ipynb](simplifying_confident_learning_tutorial.ipynb)| Implement cleanlab as raw numpy code. |
| 6 |[cifar10-cnn-coteaching](cifar10-cnn-coteaching)| Demonstrate the use of two experimental modules from cleanlab: [cifar_cnn.py](https://github.com/cleanlab/cleanlab/blob/master/cleanlab/experimental/cifar_cnn.py) and [coteaching.py](https://github.com/cleanlab/cleanlab/blob/master/cleanlab/experimental/coteaching.py)|
19
+
| 7 |[mnist-cnn](mnist-cnn)| Demonstrate the use of the following experimental module from cleanlab: [mnist_pytorch.py](https://github.com/cleanlab/cleanlab/blob/master/cleanlab/experimental/mnist_pytorch.py)|
20
+
| 8 |[amazon-reviews-fasttext](amazon-reviews-fasttext)| Demonstrate the use of the following experimental module from cleanlab: [fasttext.py](https://github.com/cleanlab/cleanlab/blob/master/cleanlab/experimental/fasttext.py)|
21
+
22
+
## Instructions
23
+
24
+
To run the latest example notebooks, execute the commands below which will install the required libraries in a virtual environment.
25
+
26
+
It is recommended to run the examples with the latest stable cleanlab release. See `requirements.txt` file.
27
+
28
+
```console
29
+
$ python -m pip install virtualenv
30
+
$ python -m venv env
31
+
$ source env/bin/activate
32
+
$ python -m pip install -r requirements.txt
33
+
```
34
+
35
+
For examples 1-5, you may run the notebooks individually or run the bash script below which will execute and save each notebook.
36
+
37
+
Bash script:
38
+
39
+
```console
40
+
$ bash ./run_all_notebooks.sh
41
+
```
42
+
43
+
For examples 6-8, please follow the instructions in the `README` of each folder.
44
+
45
+
## Older Examples
46
+
47
+
See the `contrib` folder for examples from v1 of cleanlab which may be helpful for reproducing results from the [Confident Learning paper](https://arxiv.org/abs/1911.00068).
15
48
16
49
## License
17
50
18
-
Copyright (c) 2017-2021 Cleanlab Inc.
51
+
Copyright (c) 2017-2022 Cleanlab Inc.
19
52
20
53
All files listed above and contained in this folder (<https://github.com/cleanlab/examples>) are part of cleanlab.
21
54
@@ -26,7 +59,7 @@ the Free Software Foundation, either version 3 of the License, or
26
59
27
60
cleanlab is distributed in the hope that it will be useful,
28
61
but WITHOUT ANY WARRANTY; without even the implied warranty of
29
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
62
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30
63
GNU Affero General Public License for more details.
31
64
32
65
You should have received a copy of the GNU Affero General Public License in [LICENSE](LICENSE).
0 commit comments