Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fast-explain

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast-explain

Fit Fast, Explain Fast

  • 0.0.91
  • PyPI
  • Socket score

Maintainers
1

FastExplain

Fit Fast, Explain Fast

Installing

pip install fast-explain

Clean Data, Fit ML Models and Explore Results all in one line.

FastExplain provides an out-of-the-box tool for analysts to quickly explore data, train and interpret models, with flexibility to fine-tune if needed.

  • Automated cleaning and fitting of machine learning models with hyperparameter search
  • Aesthetic display of explanatory methods ready for reporting
  • Connected interface for all data, models and related explanatory methods

Quickstart

Open In Colab

Automated Cleaning and Fitting

from FastExplain import *
df = load_titanic_data()
classification = model_data(df, dep_var="Survived", model="ebm")

Aesthetic Display

feature_correlation(classification.data.df)
Feature Correlation
plot_one_way_analysis(classification.data.df, "Age", "Survived", filter = "Sex == 1")
One Way
plot_ebm_explain(classification.m, classification.data.df, "Age")
EBM
plot_ale(classification.m, classification.data.xs, "Age", filter = "Sex == 1", dep_name = "Survived")
ALE
classification_1 = model_data(df, dep_var="Survived", model="rf", hypertune=True, cont_names=['Age'], cat_names = [], hypertune=True)
models = [classification.m, classification_1.m]
data = [classification.data.xs, classification_1.data.xs]
plot_ale(models, data, 'Age', dep_name = "Survived")
multi_ALE

Connected Interface

classification_1.plot_one_way_analysis("Age", filter = "Sex == 1")
classification_1.plot_ale("Age", filter = "Sex == 1")
classification_1.shap_dependence_plot("Age", filter = "Sex == 1")
SHAP
classification_1.error
# {'auc': {'model': {'train': 0.9934332941166654,
# 'val': 0.8421607378129118,
# 'overall': 0.9665739941840028}},
# 'cross_entropy': {'model': {'train': 0.19279692001978943,
# 'val': 0.4600233891109683,
# 'overall': 0.24648214781700722}}}

Models Supported

  • Random Forest
  • XGBoost
  • Explainable Boosting Machine
  • ANY Model Class with fit and predict attributes
pip install lightgbm
from lightgbm import LGBMClassifier
custom_model = model_data(df, 'Survived', model=LGBMClassifier)
custom_model.plot_ale("Age")
custom_model.shap_dependence_plot("Age")

Exploratory Methods Supported:

  • One-way Analysis
  • Two-way Analysis
  • Feature Importance Plots
  • ALE Plots
  • Explainable Boosting Methods
  • SHAP Values
  • Partial Dependence Plots
  • Sensitivity Analysis

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc