Skip to main content

This project uses shapely values for selecting Top n features compatible with scikit learn pipeline

Project description

Zoish

Zoish is a package built to use SHAP (SHapley Additive exPlanation) for a better feature selection. It is compatible with scikit-learn pipeline . This package uses FastTreeSHAP while calcualtion shap values.

Introduction

Zoish has a class named ScallyShapFeatureSelector that can receive various parameters. From a tree-based estimator class to its tunning parameters and from Grid search, Random Search, or Optuna to their parameters. X, y, will be split to train and validation set, and then optimization will estimate optimal related parameters.

After that, the best subset of features with higher shap values will be returned. This subset can be used as the next steps of the Sklearn pipeline.

Installation

Zoish package is available on PyPI and can be installed with pip:

pip install zoish

Supported estimators

  • XGBRegressor XGBoost
  • XGBClassifier XGBoost
  • RandomForestClassifier
  • RandomForestRegressor
  • CatBoostClassifier
  • CatBoostRegressor
  • BalancedRandomForestClassifier
  • LGBMClassifier LightGBM
  • LGBMRegressor LightGBM

Usage

  • Find features using specific tree-based models with the highest shap values after hyper-parameter optimization
  • Plot the shap summary plot for selected features
  • Return a sorted two-column Pandas data frame with a list of features in one column and shap values in another.

Notebooks

License

Licensed under the BSD 2-Clause License.

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

zoish-1.55.0.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

zoish-1.55.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

Details for the file zoish-1.55.0.tar.gz.

File metadata

  • Download URL: zoish-1.55.0.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.10.104-linuxkit

File hashes

Hashes for zoish-1.55.0.tar.gz
Algorithm Hash digest
SHA256 c3219e990aebbd09b12ef48ea24f4491a63dab79db94afcb063676dacc34675b
MD5 d606ea7d477527959a91a34e797f4734
BLAKE2b-256 cb17a533c3c9c6ee686eba38a3064c2d3e6755124758a48ab0511c4635877428

See more details on using hashes here.

File details

Details for the file zoish-1.55.0-py3-none-any.whl.

File metadata

  • Download URL: zoish-1.55.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.10.5 Linux/5.10.104-linuxkit

File hashes

Hashes for zoish-1.55.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d6d61fc3573a554f1d7106ec57297bd7099e4f50544e33f0c054f13f9929a83
MD5 05b212a992b665fe91b1962e8b759433
BLAKE2b-256 88bac2d79a4f380518ae61f2b43d120ac8bfead99aecd9e8570ae211ff4c50b9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page