Tools to extend sklearn
Project description
sktools
sktools provides tools to extend sklearn, like several feature engineering based transformers.
Installation
To install sktools, run this command in your terminal:
$ pip install sktools
Documentation
Can be found in https://sktools.readthedocs.io
Usage
from sktools import IsEmptyExtractor
from sklearn.linear_model import LogisticRegression
from sklearn.pipeline import Pipeline
...
mod = Pipeline([
("impute-features", IsEmptyExtractor()),
("model", LogisticRegression())
])
...
Features
Here’s a list of features that sktools currently offers:
sktools.encoders.NestedTargetEncoder performs target encoding suited for variables with nesting.
sktools.encoders.QuantileEncoder performs target aggregation using a quantile instead of the mean.
sktools.preprocessing.CyclicFeaturizer converts numeric to cyclical features via sine and cosine transformations.
sktools.impute.IsEmptyExtractor creates binary variables indicating if there are missing values.
sktools.matrix_denser.MatrixDenser transformer that converts sparse matrices to dense.
sktools.quantilegroups.GroupedQuantileTransformer creates quantiles of a feature by group.
sktools.quantilegroups.PercentileGroupFeaturizer creates features regarding how an instance compares with a quantile of its group.
sktools.quantilegroups.MeanGroupFeaturizer creates features regarding how an instance compares with the mean of its group.
sktools.selectors.TypeSelector gets variables matching a type.
sktools.selectors.ItemsSelector allows to manually choose some variables.
sktools.ensemble.MedianForestRegressor applies the median instead of the mean when aggregating trees predictions.
sktools.linear_model.QuantileRegression sklearn style wrapper for quantile regression.
sktools.model_selection.BootstrapFold bootstrap cross-validator.
sktools.GradientBoostingFeatureGenerator Automated feature generation through gradient boosting.
License
MIT license
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.4 (2021-03-20)
Gradient boosting feature regressor
0.1.3 (2020-07-13)
Bootstrap cross-validation
Cyclic featurizer
0.1.2 (2020-06-24)
L1 linear model and random forest
Quantile encoder refactor
0.1.1 (2020-06-10)
Refactor code, add group featurizers
0.1.0 (2020-04-19)
First release on PyPI.
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
Built Distribution
File details
Details for the file sktools-0.1.4.tar.gz
.
File metadata
- Download URL: sktools-0.1.4.tar.gz
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 913fc14659f3aa4d0ac079d2746edb025c462190bf1084b2d8ab31de80384f51 |
|
MD5 | 048f2de88fa7db49f10798e790521e2f |
|
BLAKE2b-256 | f833628a860d0c85d04e2490becd63875deb6d48994ffddc34c14aa611453451 |
File details
Details for the file sktools-0.1.4-py2.py3-none-any.whl
.
File metadata
- Download URL: sktools-0.1.4-py2.py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd4966989fd164f8e2808a86a4ed7aaba38a883ba7141194800e5b799484882 |
|
MD5 | 25ebb3c50d8506bca1c5d1da4b0b7445 |
|
BLAKE2b-256 | d2425d4a5c8a3543ab6ac51ff7f49d068a8e5a883d4dcbcd8f1027187de576a7 |