Registry / ai-ml / sklearn-evaluation

sklearn-evaluation

JSON →
library0.12.2pypypi✓ verified 85d ago

A Python library for evaluating scikit-learn models, providing a rich set of plots, tables, and markdown reports. Current version 0.12.2. Released irregularly; latest releases are minor patches.

pip install sklearn-evaluation
INSTALL
IMPORT
SIG · SKLEARN-EVALUATION
S
sklearn-evaluation
ai-mlpythonv0.12.2
Install
24.8s avg
Import
—
Disk
525MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.12.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 24.8s · import 0.000s · 512MB
525MB installed
● package 525MB
Code
Verified usage

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

ClassifierEvaluator
✓ from sklearn_evaluation import ClassifierEvaluator
✗ from sklearn_evaluation import ClassificationReport

Train a Random Forest classifier and generate a classification report.

from sklearn.datasets import make_classification from sklearn.model_selection import train_test_split from sklearn.ensemble import RandomForestClassifier from sklearn_evaluation import ClassificationReport X, y = make_classification(random_state=0) X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0) clf = RandomForestClassifier(random_state=0) clf.fit(X_train, y_train) y_pred = clf.predict(X_test) report = ClassificationReport(y_test, y_pred) print(report) report.plot()
Debug
Known issues
gotchaImport from 'sklearn_evaluation' with underscores, not 'sklearn-evaluation' (hyphen). The package name on PyPI uses a hyphen, but the import uses an underscore.
fix
Use 'from sklearn_evaluation import ...'
affects: all
deprecatedVersion 0.5 introduced a new API for reports, deprecating the old 'sklearn_evaluation.plot.*' functions. Users should use the new object-oriented API (e.g., ClassificationReport, ConfusionMatrix) instead of the old functional interface.
fix
Use classes like ClassificationReport, ConfusionMatrix, etc.
affects: >=0.5
breakingIn version 0.5, the report generation API changed. Old code using 'sklearn_evaluation.report' may break.
fix
Migrate to the new API: from sklearn_evaluation import ClassificationReport
affects: <0.5 to >=0.5
Upgrade
Version history
0.12.2latest on PyPI · released Sep 18, 2024
Audit
Dependencies
scikit-learnrequiredCore dependency for model evaluation
matplotlibrequiredRequired for plotting
pandasrequiredUsed for data manipulation and tables
Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
sklearn-evaluation — pip install sklearn-evaluation · libregistry