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)
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'cleanlab.pruning'
pruning module was removed in cleanlab v2.0
fixUse `from cleanlab.classification import CleanLearning` instead
TypeError: find_label_issues() missing 1 required positional argument: 'pred_probs'
pred_probs (predicted probabilities) not provided
fixPass 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)
fixEnsure labels are 1D array-like; avoid using pandas Series directly
ImportError: cannot import name 'LearningWithNoisyLabels' from 'cleanlab'
Renamed in v2.0
fixUse `from cleanlab.classification import CleanLearning`
TypeError: '<' not supported between instances of 'str' and 'int'
Label dtype mismatch (string vs int)
fixConvert 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
Resources
No resource links recorded.