Registry / ai-ml / cleanlab

cleanlab

JSON →
library2.9.0pypypi✓ verified 85d ago

cleanlab is the standard package for data-centric AI, automatically finding and fixing label errors, outliers, and other data issues in datasets for classification, regression, and more. Current version is 2.9.0, released on a monthly/quarterly cadence.

pip install cleanlab
INSTALL
IMPORT
SIG · CLEANLAB
C
cleanlab
ai-mlpythonv2.9.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CleanLearning
from cleanlab.classification import CleanLearning
from cleanlab import CleanLearning
CleanLearning is not a top-level import; it's under cleanlab.classification
find_label_issues
from cleanlab.filter import find_label_issues
from cleanlab import find_label_issues
find_label_issues is under cleanlab.filter, not top-level
LearningWithNoisyLabels
from cleanlab.classification import CleanLearning
LearningWithNoisyLabels is removed; use CleanLearning instead
Renamed in v2.0

Fits a classifier with noisy labels and identifies likely label errors.

import numpy as np from sklearn.linear_model import LogisticRegression from cleanlab.classification import CleanLearning # Toy data with label errors np.random.seed(42) X = np.random.rand(100, 2) y = np.random.randint(0, 2, 100) # Introduce label errors flip = np.random.rand(100) < 0.2 y[flip] = 1 - y[flip] cl = CleanLearning(clf=LogisticRegression()) cl.fit(X, y) label_issues = cl.get_label_issues() print(label_issues)
Debug
Known issues
deprecated`LearningWithNoisyLabels` has been renamed to `CleanLearning` in v2.0
fix
Use `from cleanlab.classification import CleanLearning`
affects: <=1.0
breakingIn v2.0, the `cleanlab.pruning` module was removed; functionality moved to `cleanlab.classification`
fix
Use `CleanLearning` with `find_label_issues` method
affects: >=2.0
gotcha`find_label_issues` expects predicted probabilities (`pred_probs`), not predictions
fix
Ensure you pass predicted probabilities (e.g., from `predict_proba`) to `find_label_issues`
affects: all
gotchaCleanLearning requires a classifier that implements `predict_proba`
fix
Use classifiers with `predict_proba` method (e.g., LogisticRegression, RandomForestClassifier)
affects: all
deprecated`cleanlab.latent_algebra` is deprecated; use `cleanlab.internal.latent_algebra`
fix
Import from `cleanlab.internal.latent_algebra`
affects: >=2.6
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cleanlab.pruning'
pruning module was removed in cleanlab v2.0
fix
Use `from cleanlab.classification import CleanLearning` instead
TypeError: find_label_issues() missing 1 required positional argument: 'pred_probs'
pred_probs (predicted probabilities) not provided
fix
Pass pred_probs from your model's predict_proba method: find_label_issues(labels, pred_probs, ...)
ValueError: The truth value of an array with more than one element is ambiguous
Passing NumPy array where boolean index is expected (common with pandas)
fix
Ensure labels are 1D array-like; avoid using pandas Series directly
ImportError: cannot import name 'LearningWithNoisyLabels' from 'cleanlab'
Renamed in v2.0
fix
Use `from cleanlab.classification import CleanLearning`
TypeError: '<' not supported between instances of 'str' and 'int'
Label dtype mismatch (string vs int)
fix
Convert labels to consistent numeric type (e.g., labels = labels.astype(int))
Upgrade
Version history
2.9.0latest on PyPI · released Jan 13, 2026
Audit
Dependencies
numpyrequiredCore dependency for array operations
scikit-learnrequiredUsed for model training and metrics
pandasoptionalUsed for data handling in DataFrames
matplotliboptionalOptional, for visualizations
Agent activity
15 hits · last 30 days
node
14
OpenAI (training)
1
Resources

No resource links recorded.

cleanlab — pip install cleanlab · libregistry