/skutil

Utilities for scikit-learn.

Primary LanguagePythonMIT LicenseMIT

skutil

PyPI-Status PyPI-Versions Build-Status Codecov LICENCE

Utilities for scikit-learn.

from skutil.estimators import ColumnIgnoringClassifier
# use a classifier that can't handle string data as
# an inner classifier in some stacked model, for example
pip install skutil

skutil is divided into several sub-modules by functionality:

ColumnIgnoringClassifier - An sklearn classifier wrapper that ignores input columns by index.

ObjColIgnoringClassifier - An sklearn classifier wrapper that ignores object columns in dataframes.

classifier_cls_by_name - Get an sklearn classifier class by name. Also supports lowercasing and some shorthands (e.g. svm for SVC, logreg and lr for LogisticRegression).

ConstrainedParameterGrid - Grid of discrete-valued parameters with constraints.

Package author and current maintainer is Shay Palachy (shay.palachy@gmail.com); You are more than welcome to approach him for help. Contributions are very welcomed.

Clone:

git clone git@github.com:shaypal5/skutil.git

Install in development mode, and with test dependencies:

cd skutil
pip install -e ".[test]"

To run the tests use:

cd skutil
pytest

The project is documented using the numpy docstring conventions, which were chosen as they are perhaps the most widely-spread conventions that are both supported by common tools such as Sphinx and result in human-readable docstrings. When documenting code you add to this project, follow these conventions.

Created by Shay Palachy (shay.palachy@gmail.com).