Skip to content
master
Switch branches/tags
Code

Latest commit

* 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 <1390638+jwmueller@users.noreply.github.com>
315dfb3

Git stats

Files

Permalink
Failed to load latest commit information.

cleanlab Examples

This repo contains code examples that demonstrate how to use cleanlab and how confident learning works to find label errors.

To quickly learn the basics of running cleanlab on your own data, we recommend first starting here before diving into the examples below.

Table of Contents

Recommended order of examples to try:

Example Description
1 iris_simple_example.ipynb Use cleanlab to find synthetic label errors in the Iris dataset.
2 classifier_comparison.ipynb Demonstrate how cleanlab can be used to train 10 different classifiers on 4 dataset distributions with label errors.
3 model_selection_demo.ipynb Perform hyperparameter optimization to find the best settings of cleanlab's optional parameters.
4 simplifying_confident_learning_tutorial.ipynb Implement cleanlab as raw numpy code.
5 visualizing_confident_learning.ipynb Demonstrate how cleanlab performs noise matrix estimation.
6 cifar10-cnn-coteaching Demonstrate the use of two experimental modules from cleanlab: cifar_cnn.py and coteaching.py
7 mnist-cnn Demonstrate the use of the following experimental module from cleanlab: mnist_pytorch.py
8 amazon-reviews-fasttext Demonstrate the use of the following experimental module from cleanlab: fasttext.py

Instructions

To run the latest example notebooks, execute the commands below which will install the required libraries in a virtual environment.

It is recommended to run the examples with the latest stable cleanlab release. See requirements.txt file.

$ python -m pip install virtualenv
$ python -m venv env
$ source env/bin/activate
$ python -m pip install -r requirements.txt

For examples 1-5, you may run the notebooks individually or run the bash script below which will execute and save each notebook.

Bash script:

$ bash ./run_all_notebooks.sh

For examples 6-8, please follow the instructions in the README of each folder.

Older Examples

See the contrib folder for examples from v1 of cleanlab which may be helpful for reproducing results from the Confident Learning paper.

License

Copyright (c) 2017-2022 Cleanlab Inc.

All files listed above and contained in this folder (https://github.com/cleanlab/examples) are part of cleanlab.

cleanlab is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

cleanlab is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License in LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages