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

The source code for the site is licensed under the MIT license, which you can find in the MIT-LICENSE.txt file.

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.54.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

zoish-1.54.0-py3-none-any.whl (12.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zoish-1.54.0.tar.gz
  • Upload date:
  • Size: 12.0 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.54.0.tar.gz
Algorithm Hash digest
SHA256 fa6d09e7c45aeda02c6e808b0d4116f40302eedc56fd71987606ef50bb7b8d62
MD5 5133d47f3670d52d619e2df919bebbfe
BLAKE2b-256 5f18a0cbd02b426cc44572887736d265a0490d2a074619dddd277c3b99938dfb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zoish-1.54.0-py3-none-any.whl
  • Upload date:
  • Size: 12.4 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.54.0-py3-none-any.whl
Algorithm Hash digest
SHA256 99fc14f9d8c9dfe6ac5abc3f0f4895177422dfe31a7392368efec437d36be7b3
MD5 7f3944187d4a28f2357d0beb5b266243
BLAKE2b-256 7e2b32b64e0e93af1a79ac5f525a5bb5096b403afecd1a03efd35c4cfd5b0279

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