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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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