← all repositories
BCG-X-Official/facet

SHAP tells you one prediction; FACET tells you the whole model

BCG X's library adds global feature-interaction metrics and virtual experiments on top of scikit-learn pipelines.

★534 stars Jupyter Notebook ML Frameworks
Collecting fresh signals — velocity needs a few days of history.
collecting data…
star history

What it does

FACET is a Python library for explaining supervised ML models at the global level, not just per-prediction. It ships two main ideas: model inspection, which quantifies pairwise dependencies and interactions between features, and model simulation, which runs “virtual experiments” on a fitted model to find scenarios that optimise predicted outcomes. It also wraps scikit-learn’s pipeline workflow with model-selection tooling and its companion library sklearndf, which keeps pandas DataFrames traceable end to end.

The interesting bit

The inspection piece introduces two asymmetric, percentage-based metrics for every feature pair: synergy (how much a feature leans on another to make a prediction) and redundancy (how much one feature duplicates another’s information). The asymmetry is the clever part — house size “knows” more of what bedroom count does than vice versa, and the metrics capture that direction. This complements SHAP’s local explanations with a global view, and there’s a formal write-up on arXiv (2107.12436).

Key highlights

  • Synergy and redundancy matrices for all feature pairs, visualised out of the box
  • Model simulation with bootstrapping (stationary and stratified) to quantify uncertainty in virtual experiments
  • LearnerSelector ranks competing hyperparameter configurations and even different learners side by side
  • Built on scikit-learn pipelines via sklearndf, so feature names survive the whole workflow
  • Available on both PyPI and conda

Caveats

  • Scikit-learn estimators only — this is not for deep learning frameworks
  • The primary language on GitHub is Jupyter Notebook, so expect the repo to lean heavily on tutorial notebooks rather than a compact library codebase

Verdict

Worth a look if you fit scikit-learn models and need to explain feature relationships to humans, not just individual predictions. If you’re outside the sklearn/pandas world, it’s not for you.

Frequently asked

What is BCG-X-Official/facet?
BCG X's library adds global feature-interaction metrics and virtual experiments on top of scikit-learn pipelines.
Is facet open source?
Yes — BCG-X-Official/facet is open source, released under the Apache-2.0 license.
What language is facet written in?
BCG-X-Official/facet is primarily written in Jupyter Notebook.
How popular is facet?
BCG-X-Official/facet has 534 stars on GitHub.
Where can I find facet?
BCG-X-Official/facet is on GitHub at https://github.com/BCG-X-Official/facet.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.