Machine learning with a reject option
Project description
scikit-fallback is a scikit-learn-compatible Python package for machine learning with a reject option.
Get started w/ scikit-fallback
Usage
from skfb.estimators import RateFallbackClassifierCV
from skfb.metrics import predict_reject_accuracy_score
from sklearn.linear_model import LogisticRegression
rejector = RateFallbackClassifierCV(
LogisticRegression(),
fallback_rates=[0.05, 0.07],
cv=5,
)
rejector.fit(X_train, y_train)
y_pred = rejector.predict(X_test)
print(predict_reject_accuracy_score(y_test, y_pred))
Installation
scikit-fallback
requires:
- Python (>=3.9,< 3.13)
- scikit-learn (>=1.3)
Examples
See the examples/
directory for various applications of fallback estimators and
scorers to scikit-learn-compatible pipelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scikit_fallback-0.0.0.tar.gz
(31.8 kB
view hashes)
Built Distribution
Close
Hashes for scikit_fallback-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd59e5ad4d5c822133459c17be0faac2a65c0f8ac57a3ed4604286bb9946a36 |
|
MD5 | aa33071c314719a3a180fd36f26738d2 |
|
BLAKE2b-256 | beee938ac3a00dcafabd8ad535546dad3738e4e43ef6083256502573ca98ec90 |