Value-driven metrics and models for scikit-learn
Project description
Empulse
Empulse is a package aimed to enable value-driven analysis in Python. The package implements popular value-driven metrics and algorithms in accordance to sci-kit learn conventions. This allows the measures to seamlessly integrate into existing ML workflows.
Installation
Install empulse
via pip with
pip install empulse
Documentation
You can find the documentation here.
Usage
We offer custom metrics and models. You can use them within the scikit-learn ecosystem.
# the scikit learn stuff we love
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import Pipeline
from sklearn.datasets import make_classification
from sklearn.model_selection import cross_val_score
from sklearn.metrics import make_scorer
# the stuff we add
from empulse.metrics import empc_score
from empulse.models import ProfLogitClassifier
X, y = make_classification()
pipeline = Pipeline([
("scale", StandardScaler()),
("model", ProfLogitClassifier())
])
cross_val_score(pipeline, X, y, scoring=make_scorer(empc_score, needs_proba=True))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
empulse-0.3.1.tar.gz
(37.3 kB
view hashes)
Built Distribution
empulse-0.3.1-py3-none-any.whl
(57.7 kB
view hashes)