From 38f3b6f21f03d7b76a00e91b6b2d2495736e7381 Mon Sep 17 00:00:00 2001
From: Azure Pipelines Note FACET 2.0 now available! FACET 2.0 brings numerous API enhancements and improvements, accelerates model
-inspection by up to a factor of 50 in many practical applications, introduces a new,
-more flexible and user-friendly API for hyperparameter tuning – with support for
-scikit-learn’s native hyperparameter searchers – and improves the styling of all
-visualizations. See the release notes
-for more details. FACET is an open source library for human-explainable AI.
+ FACET is an open source library for human-explainable AI.
It combines sophisticated model inspection and model-based simulation to enable better
explanations of your supervised machine learning models. FACET is composed of the following key components: Model Inspection FACET introduces a new algorithm to quantify dependencies and
-interactions between features in ML models.
-This new tool for human-explainable AI adds a new, global
-perspective to the observation-level explanations provided by the
-popular SHAP approach.
-To learn more about FACET’s model inspection capabilities, see the
-getting started example below. Model Simulation FACET’s model simulation algorithms use ML models for
-virtual experiments to help identify scenarios that optimise
-predicted outcomes.
-To quantify the uncertainty in simulations, FACET utilises a range
-of bootstrapping algorithms including stationary and stratified
-bootstraps.
-For an example of FACET’s bootstrap simulations, see the
-quickstart example below. Enhanced Machine Learning Workflow FACET offers an efficient and transparent machine learning
-workflow, enhancing
-scikit-learn’s
-tried and tested pipelining paradigm with new capabilities for model
-selection, inspection, and simulation.
-FACET also introduces
-sklearndf
-[documentation]
-an augmented version of scikit-learn with enhanced support for
-pandas data frames that ensures end-to-end traceability of features. FACET supports both PyPI and Anaconda.
@@ -364,9 +302,9 @@ Getting started with#
-
-
-
-
-
-
-
-
-
-
-
-Installation#
QuickstartFACET documentation.
Changes and additions to new versions are summarized in the -release notes.
+release notes.To demonstrate the model inspection capability of FACET, we first create a @@ -572,7 +510,7 @@
We do ask that for any major changes please discuss these with us first via an issue or using our team email: FacetTeam@bcg.com.
For further information on contributing please see our -contribution guide.
+contribution guide.FACET is licensed under Apache 2.0 as described in the -LICENSE file.
+LICENSE file.If you would like to know more about the team behind FACET please see the -about us page.
+about us page.We are always on the lookout for passionate and talented data scientists to join the BCG GAMMA team. If you would like to know more you can find out about BCG GAMMA, diff --git a/docs/_generated/release_notes.html b/docs/_generated/release_notes.html index eeb25d2e..9d60c3d6 100644 --- a/docs/_generated/release_notes.html +++ b/docs/_generated/release_notes.html @@ -173,6 +173,11 @@
BUILD: pin down matplotlib version to < 3.6 and scipy version to < 1.9 to ensure compatibility with pytools 1.2 and sklearndf 1.2
catch up with FACET 1.1.2
FIX: fix a bug in UnivariateProbabilitySimulator
that was introduced in
FACET 1.2.0
catch up with FACET 1.1.1
BUILD: added support for sklearndf 1.2 and scikit-learn 0.24
API: new optional parameter subsample
in method
@@ -518,8 +529,8 @@
FACET 1.1 refines and enhances the association/synergy/redundancy calculations
provided by the LearnerInspector
.
DOC: use a downloadable dataset in the getting started notebook
FIX: import catboost if present, else create a local @@ -529,15 +540,15 @@
BUILD: relax package dependencies to support any numpy version 1.`x` from 1.16
DOC: add reference to FACET research paper on the project landing page
FIX: correctly count positive class frequency in UnivariateProbabilitySimulator
API: SHAP interaction vectors can (in part) also be influenced by redundancy among features. This can inflate quantifications of synergy, especially in cases where two @@ -551,35 +562,35 @@
API: Method LearnerInspector.shap_plot_data()
now returns SHAP values for the
positive class of binary classifiers.
API: Increase efficiency of ModelSelector
parallelization by adopting the
-new pytools.parallelization.JobRunner
API provided by pytools
pytools.parallelization.JobRunner
API provided by pytools
BUILD: add support for shap
0.38 and 0.39
FIX: restrict package requirements to gamma-pytools 1.0 and sklearndf 1.0, since FACET 1.0 is not compatible with gamma-pytools 1.1
This is a maintenance release focusing on enhancements to the CI/CD pipeline and bug fixes.
API: add support for shap 0.36 and 0.37 via a new
BaseExplainer
stub class
FIX: apply color scheme to the histogram section in SimulationMatplotStyle
BUILD: add support for numpy
1.20
BUILD: add support for numpy
1.20
BUILD: updates and changes to the CI/CD pipeline
Initial release.
import logging
from abc import ABCMeta, abstractmethod
-from typing import Any, Sequence, TextIO, Tuple, TypeVar, Union
+from typing import Any, Optional, Sequence, TextIO, Tuple, TypeVar, Union, cast
from matplotlib.axes import Axes
+from matplotlib.transforms import Bbox
from mpl_toolkits.axes_grid1 import make_axes_locatable
from mpl_toolkits.axes_grid1.axes_divider import AxesDivider
from mpl_toolkits.axes_grid1.axes_size import Scaled
@@ -372,27 +373,44 @@ Source code for facet.simulation.viz._style
y_min, y_max = main_ax.get_ylim()
uplift_height = abs(y_max - y_min)
- def _x_axis_height() -> float:
- axis_below_size_pixels: float
- _, axis_below_size_pixels = main_ax.get_xaxis().get_text_heights(
+ def _x_axis_height(padding: float) -> float:
+ # get the lower bound of the x axis in data space: this is the upper
+ # bound of the space below the x axis
+ x_axis_vertical_position: float = main_ax.get_ylim()[0]
+
+ # get the upper and lower vertical bound of the tick labels
+ xaxis_tight_bbox: Optional[Bbox] = main_ax.get_xaxis().get_tightbbox(
self.get_renderer()
)
-
- y0: float
- y1: float
- ((_, y0), (_, y1)) = main_ax.transData.inverted().transform(
- ((0.0, 0.0), (0.0, axis_below_size_pixels))
+ if xaxis_tight_bbox is None:
+ return 0.0
+
+ x_axis_labels_lower: float
+ x_axis_labels_upper: float
+ (
+ x_axis_labels_lower,
+ x_axis_labels_upper,
+ ) = main_ax.transData.inverted().transform(
+ xaxis_tight_bbox.get_points()
+ )[
+ :, 1
+ ]
+
+ # calculate the height, and pad it with the multiple of the tick
+ # label height provided in arg padding
+ return (
+ max(x_axis_vertical_position - x_axis_labels_lower, 0)
+ + (x_axis_labels_upper - x_axis_labels_lower) * padding
)
- return abs(y1 - y0)
# calculate the height of the x axis in data space; add additional padding
- axis_below_size_data = _x_axis_height() * 1.2
+ axis_below_size_data = _x_axis_height(padding=0.5)
# create the axes divider, then use it to append the new sub-axes at the
# bottom while leaving sufficient padding in-between to accommodate the
# main axes' x axis labels
divider: AxesDivider = make_axes_locatable(main_ax)
- return divider.append_axes(
+ sub_axes: Axes = divider.append_axes(
position="bottom",
size=Scaled(
uplift_height * SimulationMatplotStyle.__HISTOGRAM_SIZE_RATIO
@@ -403,6 +421,7 @@ Source code for facet.simulation.viz._style
* (1 + SimulationMatplotStyle.__HISTOGRAM_SIZE_RATIO)
),
)
+ return sub_axes
ax = _make_sub_axes()
@@ -415,10 +434,10 @@ Source code for facet.simulation.viz._style
# reduce the horizontal margin such that half a bar is to the left of the
# leftmost tick mark (but the tick mark stays aligned with the main
# simulation chart)
- x_margin, _ = ax.margins()
+ x_margin, _ = cast(Tuple[float, float], ax.margins())
ax.set_xmargin(
max(
- 0,
+ 0.0,
(width_bars / 2 - x_margin * (n_partitions - 1))
/ (width_bars - (n_partitions - 1)),
)
diff --git a/docs/_sources/_generated/getting_started.rst.txt b/docs/_sources/_generated/getting_started.rst.txt
index 443d291a..fd61bebe 100644
--- a/docs/_sources/_generated/getting_started.rst.txt
+++ b/docs/_sources/_generated/getting_started.rst.txt
@@ -4,19 +4,6 @@ Getting started with
====================
.. image:: /_images/Gamma_Facet_Logo_RGB_LB.svg
-.. note:: **FACET 2.0 now available!**
-
- FACET 2.0 brings numerous API enhancements and improvements, accelerates model
- inspection by up to a factor of 50 in many practical applications, introduces a new,
- more flexible and user-friendly API for hyperparameter tuning – with support for
- `scikit-learn`'s native hyperparameter searchers – and improves the styling of all
- visualizations.
-
- See the `release notes `__
- for more details.
-
-
-
FACET is an open source library for human-explainable AI.
It combines sophisticated model inspection and model-based simulation to enable better
explanations of your supervised machine learning models.
@@ -53,8 +40,8 @@ FACET is composed of the following key components:
| | tried and tested pipelining paradigm with new capabilities for model |
| | selection, inspection, and simulation. |
| | FACET also introduces |
-| | `sklearndf `__ |
-| | [`documentation `__]|
+| | `sklearndf `__ |
+| | [`documentation `__]|
| | an augmented version of *scikit-learn* with enhanced support for |
| | *pandas* data frames that ensures end-to-end traceability of features.|
+-----------------+-----------------------------------------------------------------------+
@@ -106,10 +93,10 @@ Quickstart
The following quickstart guide provides a minimal example workflow to get you
up and running with FACET.
For additional tutorials and the API reference,
-see the `FACET documentation `__.
+see the `FACET documentation `__.
Changes and additions to new versions are summarized in the
-`release notes `__.
+`release notes `__.
Enhanced Machine Learning Workflow
@@ -348,7 +335,7 @@ removing `TCH`, and one of `TC` or `LDL` to further simplify the model and obtai
reduced set of independent features.
Please see the
-`API reference `__
+`API reference `__
for more detail.
@@ -411,21 +398,21 @@ FACET is stable and is being supported long-term.
Contributions to FACET are welcome and appreciated.
For any bug reports or feature requests/enhancements please use the appropriate
-`GitHub form `_, and if you wish to do so,
+`GitHub form `_, and if you wish to do so,
please open a PR addressing the issue.
We do ask that for any major changes please discuss these with us first via an issue or
using our team email: FacetTeam@bcg.com.
For further information on contributing please see our
-`contribution guide `__.
+`contribution guide `__.
License
-------
FACET is licensed under Apache 2.0 as described in the
-`LICENSE `_ file.
+`LICENSE `_ file.
Acknowledgements
@@ -445,7 +432,7 @@ BCG GAMMA
---------
If you would like to know more about the team behind FACET please see the
-`about us `__ page.
+`about us `__ page.
We are always on the lookout for passionate and talented data scientists to join the
BCG GAMMA team. If you would like to know more you can find out about
diff --git a/docs/_sources/_generated/release_notes.rst.txt b/docs/_sources/_generated/release_notes.rst.txt
index 45445a8d..b84e9f40 100644
--- a/docs/_sources/_generated/release_notes.rst.txt
+++ b/docs/_sources/_generated/release_notes.rst.txt
@@ -19,6 +19,12 @@ We still recommend using :mod:`sklearndf` models and learner pipelines along wit
:class:`.NativeLearnerInspector` can be useful for inspecting models that have been
trained using *scikit-learn* directly.
+2.1.1
+~~~~~
+
+This is a maintenance release to catch up with FACET |nbsp| 2.0.1.
+
+
2.1.0
~~~~~
@@ -46,6 +52,8 @@ fully type-checked by |mypy|.
and classifiers; it is no longer necessary to wrap them into a
:class:`.RegressorPipelineDF` or :class:`.ClassifierPipelineDF` instance with empty
preprocessing
+- FIX: replace a call to method ``get_text_heights()`` of :class:`matplotlib.axes.Axes`,
+ which is deprecated as of :mod:`matplotlib` |nbsp| 3.6
2.0.0
diff --git a/docs/_sources/contribution_guide.rst.txt b/docs/_sources/contribution_guide.rst.txt
index 1f6467dd..c16306dd 100644
--- a/docs/_sources/contribution_guide.rst.txt
+++ b/docs/_sources/contribution_guide.rst.txt
@@ -296,7 +296,7 @@ The ``sphinx/source`` folder contains:
The two key scripts are ``make.py`` and ``conf.py``. The base configuration for the
-these scripts can be found in `pytools/sphinx `_.
+these scripts can be found in `pytools/sphinx `_.
The reason for this is to minimise code given the standardization of the documentation
build across multiple packages.
@@ -452,7 +452,7 @@ The build process for the PyPI and conda distributions uses the following key
files:
- ``make.py``: generic Python script for package builds. Most configuration is imported
- from pytools `make.py `__
+ from pytools `make.py `__
which is a build script that wraps the package build, as well as exposing the matrix
dependency definitions specified in the ``pyproject.toml`` as environment variables
- ``pyproject.toml``: metadata for PyPI, build settings and package dependencies
diff --git a/docs/_sources/faqs.rst.txt b/docs/_sources/faqs.rst.txt
index fb62b425..ae554f83 100644
--- a/docs/_sources/faqs.rst.txt
+++ b/docs/_sources/faqs.rst.txt
@@ -14,7 +14,7 @@ on `stackoverflow `_.
1. **What if I find a bug or have an idea for a new feature?**
For bug reports or feature requests please use our
- `GitHub issue tracker `_.
+ `GitHub issue tracker `_.
For any other enquiries please feel free to contact us at FacetTeam@bcg.com.
2. **How does FACET's novel algorithm calculate pairwise feature redundancy and synergy?**
diff --git a/docs/_sources/tutorial/Classification_with_Facet.ipynb.txt b/docs/_sources/tutorial/Classification_with_Facet.ipynb.txt
index 633dd449..9a61e41e 100644
--- a/docs/_sources/tutorial/Classification_with_Facet.ipynb.txt
+++ b/docs/_sources/tutorial/Classification_with_Facet.ipynb.txt
@@ -31,7 +31,7 @@
" \n",
"- **Enhanced Machine Learning Workflow** \n",
"\n",
- " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-Gamma/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
+ " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-X-Official/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
"\n",
"***\n",
"\n",
@@ -108,7 +108,7 @@
"\n",
"1. Common packages (pandas, matplotlib, etc.)\n",
"2. Required FACET classes (inspection, selection, validation, simulation, etc.)\n",
- "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-Gamma/pytools)) when using FACET"
+ "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-X-Official/pytools)) when using FACET"
]
},
{
@@ -162,7 +162,7 @@
"source": [
"**sklearndf imports**\n",
"\n",
- "Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
+ "Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
"\n",
"`from sklearn.pipeline import Pipeline`\n",
"\n",
@@ -194,7 +194,7 @@
"source": [
"**pytools imports**\n",
"\n",
- "pytools (see on [GitHub](https://github.com/BCG-Gamma/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
+ "pytools (see on [GitHub](https://github.com/BCG-X-Official/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
]
},
{
@@ -1557,7 +1557,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "For convenience when working in a non-notebook environment, all of the `Drawer`'s provided by the [pytools](https://github.com/BCG-Gamma/pytools) package also support a `style='text'` flag."
+ "For convenience when working in a non-notebook environment, all of the `Drawer`'s provided by the [pytools](https://github.com/BCG-X-Official/pytools) package also support a `style='text'` flag."
]
},
{
diff --git a/docs/_sources/tutorial/Model_simulation_deep_dive.ipynb.txt b/docs/_sources/tutorial/Model_simulation_deep_dive.ipynb.txt
index 6b10d66f..6a0d540d 100644
--- a/docs/_sources/tutorial/Model_simulation_deep_dive.ipynb.txt
+++ b/docs/_sources/tutorial/Model_simulation_deep_dive.ipynb.txt
@@ -40,7 +40,7 @@
" \n",
"- **Enhanced Machine Learning Workflow** \n",
"\n",
- " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-Gamma/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features.\n",
+ " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-X-Official/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features.\n",
"\n",
"***\n",
"\n",
@@ -117,7 +117,7 @@
"\n",
"1. Common packages (pandas, matplotlib, etc.)\n",
"2. Required FACET classes (inspection, selection, validation, simulation, etc.)\n",
- "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/BCG-Gamma/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-Gamma/pytools)) when using FACET"
+ "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/BCG-X-Official/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-X-Official/pytools)) when using FACET"
]
},
{
@@ -168,7 +168,7 @@
"source": [
"**sklearndf imports**\n",
"\n",
- "Instead of using the \"regular\" *scikit-learn* package, we are going to use *sklearndf* (see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)). *sklearndf* is an open source library designed to address a common issue with *scikit-learn*: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. *sklearndf* retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard *scikit-learn* import:\n",
+ "Instead of using the \"regular\" *scikit-learn* package, we are going to use *sklearndf* (see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)). *sklearndf* is an open source library designed to address a common issue with *scikit-learn*: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. *sklearndf* retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard *scikit-learn* import:\n",
"\n",
"`from sklearn.pipeline import Pipeline`\n",
"\n",
@@ -193,7 +193,7 @@
"source": [
"**pytools imports**\n",
"\n",
- "pytools (see on [GitHub](https://github.com/BCG-Gamma/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
+ "pytools (see on [GitHub](https://github.com/BCG-X-Official/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
]
},
{
diff --git a/docs/_sources/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb.txt b/docs/_sources/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb.txt
index 00f821d3..02385b16 100644
--- a/docs/_sources/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb.txt
+++ b/docs/_sources/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb.txt
@@ -27,7 +27,7 @@
" \n",
"- **Enhanced Machine Learning Workflow** \n",
"\n",
- " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-Gamma/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
+ " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-X-Official/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
"\n",
"***\n",
"\n",
@@ -89,7 +89,7 @@
"\n",
"1. Common packages (pandas, matplotlib, sklearn, etc.)\n",
"2. Required FACET classes (i.e., selection)\n",
- "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)) when using FACET"
+ "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)) when using FACET"
]
},
{
@@ -151,7 +151,7 @@
"source": [
"**sklearndf imports**\n",
"\n",
- "Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/orgs/BCG-Gamma/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
+ "Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/orgs/BCG-X-Official/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
"\n",
"`from sklearn.pipeline import Pipeline`\n",
"\n",
diff --git a/docs/_sources/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb.txt b/docs/_sources/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb.txt
index 6289d3e0..5a02f025 100644
--- a/docs/_sources/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb.txt
+++ b/docs/_sources/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb.txt
@@ -29,7 +29,7 @@
" \n",
"- **Enhanced Machine Learning Workflow** \n",
"\n",
- " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-Gamma/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
+ " FACET offers an efficient and transparent machine learning workflow, enhancing [scikit-learn]( https://scikit-learn.org/stable/index.html)'s tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces [sklearndf](https://github.com/BCG-X-Official/sklearndf), an augmented version of *scikit-learn* with enhanced support for *pandas* dataframes that ensures end-to-end traceability of features. \n",
"\n",
"***\n",
"\n",
@@ -111,7 +111,7 @@
"\n",
"1. Common packages (pandas, matplotlib, etc.)\n",
"2. Required FACET classes (inspection, selection, validation, simulation, etc.)\n",
- "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/BCG-Gamma/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-Gamma/pytools)) when using FACET"
+ "3. Other BCG GAMMA packages which simplify pipelining (sklearndf, see on [GitHub](https://github.com/BCG-X-Official/sklearndf/)) and support visualization (pytools, see on [GitHub](https://github.com/BCG-X-Official/pytools)) when using FACET"
]
},
{
@@ -191,7 +191,7 @@
"source": [
"**sklearndf imports**\n",
"\n",
- "Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/BCG-Gamma/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
+ "Instead of using the \"regular\" scikit-learn package, we are going to use sklearndf (see on [GitHub](https://github.com/BCG-X-Official/sklearndf/)). sklearndf is an open source library designed to address a common issue with scikit-learn: the outputs of transformers are numpy arrays, even when the input is a data frame. However, to inspect a model it is essential to keep track of the feature names. sklearndf retains all the functionality available through scikit-learn plus the feature traceability and usability associated with Pandas data frames. Additionally, the names of all your favourite scikit-learn functions are the same except for `DF` on the end. For example, the standard scikit-learn import:\n",
"\n",
"`from sklearn.pipeline import Pipeline`\n",
"\n",
@@ -231,7 +231,7 @@
"source": [
"**pytools imports**\n",
"\n",
- "pytools (see on [GitHub](https://github.com/BCG-Gamma/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
+ "pytools (see on [GitHub](https://github.com/BCG-X-Official/pytools)) is an open source library containing general machine learning and visualization utilities, some of which are useful for visualising the advanced model inspection capabilities of FACET."
]
},
{
diff --git a/docs/_static/js/versions.js b/docs/_static/js/versions.js
index 2178ec61..c87743e6 100644
--- a/docs/_static/js/versions.js
+++ b/docs/_static/js/versions.js
@@ -1,7 +1,7 @@
const DOCS_VERSIONS = {
- "current": "2.1.0",
+ "current": "2.1.1",
"all": [
- "2.1.0",
+ "2.1.1",
"2.0.1",
"1.2.3",
"1.1.2",
diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css
index f227e5c6..6110e9f1 100644
--- a/docs/_static/pygments.css
+++ b/docs/_static/pygments.css
@@ -22,6 +22,7 @@ span.linenos.special { color: #000000; background-color: #ffffc0; padding-left:
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
.highlight .gd { color: #a40000 } /* Generic.Deleted */
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
+.highlight .ges { color: #000000; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #ef2929 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #00A000 } /* Generic.Inserted */
diff --git a/docs/apidoc/facet/data/facet.data.Sample.html b/docs/apidoc/facet/data/facet.data.Sample.html
index efe0a3e4..83f6c832 100644
--- a/docs/apidoc/facet/data/facet.data.Sample.html
+++ b/docs/apidoc/facet/data/facet.data.Sample.html
@@ -601,12 +601,12 @@ facet.data.SampleDataFrame
.
+
The underlying data structure is a DataFrame
.
Supports len()
, returning the number of observations in this sample.
- Parameters
-observations (DataFrame
) – a table of observational data;
+
observations (DataFrame
) – a table of observational data;
each row represents one observation, names of all used columns must be
strings
target_name (Union
[str
, Iterable
[str
]]) – the name of the column representing the target
@@ -769,35 +769,35 @@
facet.data.Sample
-
-property features: pandas.DataFrame#
+property features: pandas.DataFrame#
The features for all observations.
-
-property index: pandas.Index#
+property index: pandas.Index#
Row index of all observations in this sample.
-
-property target: Union[pandas.Series, pandas.DataFrame]#
+property target: Union[pandas.Series, pandas.DataFrame]#
The target variable(s) for all observations.
Represented as a series if there is only a single target, or as a data frame if
there are multiple targets.
@@ -816,12 +816,12 @@ facet.data.Sample
-
-property weight: Optional[pandas.Series]#
+property weight: Optional[pandas.Series]#
A series indicating the weight for each observation; None
if no weights
are defined.
diff --git a/docs/apidoc/facet/data/partition/facet.data.partition.CategoryPartitioner.html b/docs/apidoc/facet/data/partition/facet.data.partition.CategoryPartitioner.html
index a61f81fc..5c911dce 100644
--- a/docs/apidoc/facet/data/partition/facet.data.partition.CategoryPartitioner.html
+++ b/docs/apidoc/facet/data/partition/facet.data.partition.CategoryPartitioner.html
@@ -657,7 +657,7 @@ facet.data.partition.CategoryPartitioner
- Parameters
-values (ndarray
[Any
, dtype
[Any
]]) – a sequence of observed values as the empirical basis for
+
values (ndarray
[Any
, dtype
[Any
]]) – a sequence of observed values as the empirical basis for
calculating the partitions
fit_params (Any
) – optional fitting parameters
@@ -673,11 +673,11 @@ facet.data.partition.CategoryPartitioner
-
-property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
+property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
The count of values allocated to each partition.
@@ -721,7 +721,7 @@ facet.data.partition.CategoryPartitioner
- Return type
-Sequence
[TypeVar
(T_Values
, bound= generic
)]
+-
diff --git a/docs/apidoc/facet/data/partition/facet.data.partition.ContinuousRangePartitioner.html b/docs/apidoc/facet/data/partition/facet.data.partition.ContinuousRangePartitioner.html
index bbb2e4f4..dc9f58ed 100644
--- a/docs/apidoc/facet/data/partition/facet.data.partition.ContinuousRangePartitioner.html
+++ b/docs/apidoc/facet/data/partition/facet.data.partition.ContinuousRangePartitioner.html
@@ -682,7 +682,7 @@ facet.data.partition.ContinuousRangePartitioner
- Parameters
-values (ndarray
[Any
, dtype
[float64
]]) – a sequence of observed values as the empirical basis for
+
values (ndarray
[Any
, dtype
[float64
]]) – a sequence of observed values as the empirical basis for
calculating the partitions
lower_bound (Union
[float64
, float
, int
, None
]) – the inclusive lower bound of the elements to partition
upper_bound (Union
[float64
, float
, int
, None
]) – the inclusive upper bound of the elements to partition
@@ -700,11 +700,11 @@ facet.data.partition.ContinuousRangePartitioner
-
-property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
+property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
The count of values allocated to each partition.
@@ -775,7 +775,7 @@ facet.data.partition.ContinuousRangePartitioner
- Return type
-Sequence
[TypeVar
(T_Values
, bound= generic
)]
+-
diff --git a/docs/apidoc/facet/data/partition/facet.data.partition.IntegerRangePartitioner.html b/docs/apidoc/facet/data/partition/facet.data.partition.IntegerRangePartitioner.html
index b7788e90..f0e1af6f 100644
--- a/docs/apidoc/facet/data/partition/facet.data.partition.IntegerRangePartitioner.html
+++ b/docs/apidoc/facet/data/partition/facet.data.partition.IntegerRangePartitioner.html
@@ -682,7 +682,7 @@ facet.data.partition.IntegerRangePartitioner
- Parameters
-values (ndarray
[Any
, dtype
[int64
]]) – a sequence of observed values as the empirical basis for
+
values (ndarray
[Any
, dtype
[int64
]]) – a sequence of observed values as the empirical basis for
calculating the partitions
lower_bound (Union
[int64
, float
, int
, None
]) – the inclusive lower bound of the elements to partition
upper_bound (Union
[int64
, float
, int
, None
]) – the inclusive upper bound of the elements to partition
@@ -700,11 +700,11 @@ facet.data.partition.IntegerRangePartitioner
-
-property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
+property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
The count of values allocated to each partition.
@@ -775,7 +775,7 @@ facet.data.partition.IntegerRangePartitioner
- Return type
-Sequence
[TypeVar
(T_Values
, bound= generic
)]
+-
diff --git a/docs/apidoc/facet/data/partition/facet.data.partition.Partitioner.html b/docs/apidoc/facet/data/partition/facet.data.partition.Partitioner.html
index 286a71e2..01bd47a7 100644
--- a/docs/apidoc/facet/data/partition/facet.data.partition.Partitioner.html
+++ b/docs/apidoc/facet/data/partition/facet.data.partition.Partitioner.html
@@ -598,10 +598,10 @@ facet.data.partition.Partitioner
- Bases
-FittableMixin
[ndarray
[Any
, dtype
[~T_Values]]]
+FittableMixin
[ndarray
[Any
, dtype
[~T_Values]]]
- Generic types
-~T_Values(bound= generic
)
+~T_Values(bound= generic
)
- Metaclasses
-
@@ -640,7 +640,7 @@
facet.data.partition.PartitionerTrue if this is partitioner handles categorical values, False
otherwise.
-
+
The maximum number of partitions to be generated by this partitioner.
@@ -658,7 +658,7 @@ facet.data.partition.Partitioner
- Parameters
-values (ndarray
[Any
, dtype
[TypeVar
(T_Values
, bound= generic
)]]) – a sequence of observed values as the empirical basis for
+
values (ndarray
[Any
, dtype
[TypeVar
(T_Values
, bound= generic
)]]) – a sequence of observed values as the empirical basis for
calculating the partitions
fit_params (Any
) – optional fitting parameters
@@ -674,11 +674,11 @@ facet.data.partition.Partitioner
-
-property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
+property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
The count of values allocated to each partition.
@@ -697,7 +697,7 @@ facet.data.partition.Partitioner
-
abstract property is_fitted: bool#
-See pytools.fit.FittableMixin.is_fitted
+-
diff --git a/docs/apidoc/facet/data/partition/facet.data.partition.RangePartitioner.html b/docs/apidoc/facet/data/partition/facet.data.partition.RangePartitioner.html
index 60cbe794..44172036 100644
--- a/docs/apidoc/facet/data/partition/facet.data.partition.RangePartitioner.html
+++ b/docs/apidoc/facet/data/partition/facet.data.partition.RangePartitioner.html
@@ -672,7 +672,7 @@ facet.data.partition.RangePartitioner
- Parameters
-values (ndarray
[Any
, dtype
[TypeVar
(T_Values_Numeric
, int64
, float64
)]]) – a sequence of observed values as the empirical basis for
+
values (ndarray
[Any
, dtype
[TypeVar
(T_Values_Numeric
, int64
, float64
)]]) – a sequence of observed values as the empirical basis for
calculating the partitions
lower_bound (Union
[TypeVar
(T_Values_Numeric
, int64
, float64
), float
, int
, None
]) – the inclusive lower bound of the elements to partition
upper_bound (Union
[TypeVar
(T_Values_Numeric
, int64
, float64
), float
, int
, None
]) – the inclusive upper bound of the elements to partition
@@ -690,11 +690,11 @@ facet.data.partition.RangePartitioner
-
-property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
+property frequencies_: numpy.ndarray[Any, numpy.dtype[numpy.int64]]#
The count of values allocated to each partition.
@@ -765,7 +765,7 @@ facet.data.partition.RangePartitioner
- Return type
-Sequence
[TypeVar
(T_Values
, bound= generic
)]
+-
diff --git a/docs/apidoc/facet/explanation/base/facet.explanation.base.BaseExplainer.html b/docs/apidoc/facet/explanation/base/facet.explanation.base.BaseExplainer.html
index f1c7641a..a65421fd 100644
--- a/docs/apidoc/facet/explanation/base/facet.explanation.base.BaseExplainer.html
+++ b/docs/apidoc/facet/explanation/base/facet.explanation.base.BaseExplainer.html
@@ -613,7 +613,7 @@ facet.explanation.base.BaseExplainershap 0.36, the old API is deprecated for the majority of explainers
-while the shap.KernelExplainer
still uses the old API exclusively
+while the shap.KernelExplainer
still uses the old API exclusively
in shap
0.41.
We remedy this by adding support for both APIs to all explainers created through
an ExplainerFactory
object.
@@ -702,15 +702,15 @@ facet.explanation.base.BaseExplainer
- Parameters
-X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
+
X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
model’s output
-y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
+
y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
functions (optional)
kwargs (Any
) – additional arguments specific to the explainer implementation
- Return type
-Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
+Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
- Returns
SHAP values as an array of shape
@@ -727,15 +727,15 @@
facet.explanation.base.BaseExplainer
- Parameters
-X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
+
X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
model’s output
-y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
+
y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
functions (optional)
kwargs (Any
) – additional arguments specific to the explainer implementation
- Return type
-Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
+Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
- Returns
SHAP values as an array of shape (n_observations, n_features);
diff --git a/docs/apidoc/facet/explanation/base/facet.explanation.base.ExplainerFactory.html b/docs/apidoc/facet/explanation/base/facet.explanation.base.ExplainerFactory.html
index 5dcc61f2..87c3c612 100644
--- a/docs/apidoc/facet/explanation/base/facet.explanation.base.ExplainerFactory.html
+++ b/docs/apidoc/facet/explanation/base/facet.explanation.base.ExplainerFactory.html
@@ -598,7 +598,7 @@
facet.explanation.base.ExplainerFactoryExplainer
objects.
- Bases
--
+
-
- Generic types
~T_Model
@@ -622,7 +622,7 @@ facet.explanation.base.ExplainerFactoryExplainer
to compute shap values.
-
+
@@ -656,7 +656,7 @@ facet.explanation.base.ExplainerFactoryParameters
-
- Return type
@@ -671,7 +671,7 @@ facet.explanation.base.ExplainerFactory
-
abstract to_expression()#
-See pytools.expression.HasExpressionRepr.to_expression()
+-
diff --git a/docs/apidoc/facet/explanation/facet.explanation.ExactExplainerFactory.html b/docs/apidoc/facet/explanation/facet.explanation.ExactExplainerFactory.html
index c096f381..0d0dc960 100644
--- a/docs/apidoc/facet/explanation/facet.explanation.ExactExplainerFactory.html
+++ b/docs/apidoc/facet/explanation/facet.explanation.ExactExplainerFactory.html
@@ -655,8 +655,8 @@ facet.explanation.ExactExplainerFactory
- Parameters
-model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
-
+model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
+
- Return type
@@ -675,8 +675,8 @@ facet.explanation.ExactExplainerFactory
- Parameters
-model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
-
+model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
+
- Return type
@@ -694,7 +694,7 @@ facet.explanation.ExactExplainerFactory
- Return type
--
+
-
- Returns
the expression representing this object
diff --git a/docs/apidoc/facet/explanation/facet.explanation.FunctionExplainerFactory.html b/docs/apidoc/facet/explanation/facet.explanation.FunctionExplainerFactory.html
index ec3b9ef2..2463300a 100644
--- a/docs/apidoc/facet/explanation/facet.explanation.FunctionExplainerFactory.html
+++ b/docs/apidoc/facet/explanation/facet.explanation.FunctionExplainerFactory.html
@@ -599,7 +599,7 @@ facet.explanation.FunctionExplainerFactory
- Bases
-ExplainerFactory
[Union
[RegressorMixin
, ClassifierMixin
, Callable
[[typing.Union[pandas.core.series.Series, pandas.core.frame.DataFrame, numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]]]
, Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]]
+ExplainerFactory
[Union
[RegressorMixin
, ClassifierMixin
, Callable
[[typing.Union[pandas.core.series.Series, pandas.core.frame.DataFrame, numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]]]
, Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]]
- Metaclasses
-
@@ -623,7 +623,7 @@
facet.explanation.FunctionExplainerFactory
-
+
@@ -656,8 +656,8 @@ facet.explanation.FunctionExplainerFactory
- Parameters
-model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
-
+model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
+
- Return type
@@ -676,8 +676,8 @@ facet.explanation.FunctionExplainerFactory
- Parameters
-model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
-
+model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
+
- Return type
@@ -692,7 +692,7 @@ facet.explanation.FunctionExplainerFactory
-
abstract to_expression()#
-See pytools.expression.HasExpressionRepr.to_expression()
+-
diff --git a/docs/apidoc/facet/explanation/facet.explanation.KernelExplainerFactory.html b/docs/apidoc/facet/explanation/facet.explanation.KernelExplainerFactory.html
index 644ecf81..0c0a3b16 100644
--- a/docs/apidoc/facet/explanation/facet.explanation.KernelExplainerFactory.html
+++ b/docs/apidoc/facet/explanation/facet.explanation.KernelExplainerFactory.html
@@ -595,7 +595,7 @@ facet.explanation.KernelExplainerFactory
-
class facet.explanation.KernelExplainerFactory(*, link=None, l1_reg='num_features(10)', data_size_limit=100, **explainer_kwargs)[source]#
-A factory constructing KernelExplainer
instances.
+A factory constructing KernelExplainer
instances.
- Bases
-
@@ -607,8 +607,8 @@
facet.explanation.KernelExplainerFactory
link (Optional
[str
]) – override the default link parameter (optional)
l1_reg (Optional
[str
]) – override the default l1_reg parameter of method
-shap_values()
; pass None
to use the
-default value used by shap_values()
(optional)
+shap_values()
; pass None
to use the
+default value used by shap_values()
(optional)
data_size_limit (Optional
[int
]) – maximum number of observations to use as
the background data set; larger data sets will be down-sampled using
kmeans; don’t downsample if omitted (optional)
@@ -664,8 +664,8 @@ facet.explanation.KernelExplainerFactory
- Parameters
-model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
-
+model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
+
- Return type
@@ -684,8 +684,8 @@ facet.explanation.KernelExplainerFactory
- Parameters
-model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
-
+model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
+
- Return type
@@ -703,7 +703,7 @@ facet.explanation.KernelExplainerFactory
- Return type
--
+
-
- Returns
the expression representing this object
diff --git a/docs/apidoc/facet/explanation/facet.explanation.PermutationExplainerFactory.html b/docs/apidoc/facet/explanation/facet.explanation.PermutationExplainerFactory.html
index f7f77e2a..974a3b47 100644
--- a/docs/apidoc/facet/explanation/facet.explanation.PermutationExplainerFactory.html
+++ b/docs/apidoc/facet/explanation/facet.explanation.PermutationExplainerFactory.html
@@ -655,8 +655,8 @@ facet.explanation.PermutationExplainerFactory
- Parameters
-model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
-
+model (Union
[RegressorMixin
, ClassifierMixin
, Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]]) – fitted learner for which to compute shap values
+
- Return type
@@ -675,8 +675,8 @@ facet.explanation.PermutationExplainerFactory
- Parameters
-model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
-
+model_fn (Callable
[[Union
[Series
, DataFrame
, ndarray
[Any
, dtype
[float64
]]]], Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]]) – the function representing the model
+
- Return type
@@ -694,7 +694,7 @@ facet.explanation.PermutationExplainerFactory
- Return type
--
+
-
- Returns
the expression representing this object
diff --git a/docs/apidoc/facet/explanation/facet.explanation.TreeExplainerFactory.html b/docs/apidoc/facet/explanation/facet.explanation.TreeExplainerFactory.html
index 38ef8205..03e3c8e4 100644
--- a/docs/apidoc/facet/explanation/facet.explanation.TreeExplainerFactory.html
+++ b/docs/apidoc/facet/explanation/facet.explanation.TreeExplainerFactory.html
@@ -595,7 +595,7 @@ facet.explanation.TreeExplainerFactory
-
class facet.explanation.TreeExplainerFactory(*, model_output=None, feature_perturbation=None, uses_background_dataset=True, **explainer_kwargs)[source]#
-A factory constructing TreeExplainer
instances.
+A factory constructing TreeExplainer
instances.
- Bases
ExplainerFactory
[Union
[RegressorMixin
, ClassifierMixin
]]
@@ -661,7 +661,7 @@ facet.explanation.TreeExplainerFactoryParameters
model (Union
[RegressorMixin
, ClassifierMixin
]) – fitted learner for which to compute shap values
-
+
- Return type
@@ -679,7 +679,7 @@ facet.explanation.TreeExplainerFactory
- Return type
--
+
-
- Returns
the expression representing this object
diff --git a/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerJob.html b/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerJob.html
index ba21256f..6b16b76e 100644
--- a/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerJob.html
+++ b/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerJob.html
@@ -598,7 +598,7 @@ facet.explanation.parallel.ExplainerJob
- Bases
-Job
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]
+Job
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]
- Metaclasses
-
@@ -606,8 +606,8 @@
facet.explanation.parallel.ExplainerJobParameters
explainer (BaseExplainer
) – the SHAP explainer to use
-X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – the feature values of the observations to be explained
-y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – the target values of the observations to be explained
+X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – the feature values of the observations to be explained
+y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – the target values of the observations to be explained
interactions (bool
) – if False
, calculate SHAP values; if True
,
calculate SHAP interaction values
kwargs (Any
) – additional arguments specific to the explanation method
@@ -622,7 +622,7 @@ facet.explanation.parallel.ExplainerJob
-
+
Run this job.
@@ -657,7 +657,7 @@ facet.explanation.parallel.ExplainerJob
-
classmethod delayed(function)#
-See pytools.parallelization.Job.delayed()
+-
@@ -666,7 +666,7 @@ facet.explanation.parallel.ExplainerJob
- Return type
-Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]
+Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]
- Returns
the result produced by the job
@@ -676,7 +676,7 @@ facet.explanation.parallel.ExplainerJob
-
-X: Union[numpy.ndarray[Any, numpy.dtype[Any]], pandas.DataFrame, facet.explanation.Pool]#
+X: Union[numpy.ndarray[Any, numpy.dtype[Any]], pandas.DataFrame, facet.explanation.Pool]#
the feature values of the observations to be explained
@@ -700,7 +700,7 @@ facet.explanation.parallel.ExplainerJob
-
-y: Optional[Union[numpy.ndarray[Any, numpy.dtype[Any]], pandas.Series]]#
+y: Optional[Union[numpy.ndarray[Any, numpy.dtype[Any]], pandas.Series]]#
the target values of the observations to be explained
diff --git a/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerQueue.html b/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerQueue.html
index dacc1369..41f4ab7d 100644
--- a/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerQueue.html
+++ b/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ExplainerQueue.html
@@ -598,7 +598,7 @@ facet.explanation.parallel.ExplainerQueue
- Bases
-JobQueue
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]], Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]
+JobQueue
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]], Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]
- Metaclasses
-
@@ -606,8 +606,8 @@
facet.explanation.parallel.ExplainerQueueParameters
explainer (BaseExplainer
) – the SHAP explainer to use
-X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – the feature values of the observations to be explained
-y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – the target values of the observations to be explained
+X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – the feature values of the observations to be explained
+y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – the target values of the observations to be explained
interactions (bool
) – if False
, calculate SHAP values; if True
,
calculate SHAP interaction values
max_job_size (int
) – the maximum number of observations to allocate to each job
@@ -633,7 +633,7 @@ facet.explanation.parallel.ExplainerQueue
-
+
@@ -675,11 +675,11 @@ facet.explanation.parallel.ExplainerQueue
- Parameters
-job_results (List
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]) – list of job results, ordered corresponding to the sequence
+
job_results (List
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]) – list of job results, ordered corresponding to the sequence
of jobs generated by method jobs()
- Return type
-Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]
+Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]
- Returns
the aggregated result of running the queue
@@ -693,7 +693,7 @@ facet.explanation.parallel.ExplainerQueue
- Return type
-Iterable
[Job
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]]
+Iterable
[Job
[Union
[ndarray
[Any
, dtype
[Any
]], List
[ndarray
[Any
, dtype
[Any
]]]]]]
- Returns
the jobs in this queue
@@ -704,12 +704,12 @@ facet.explanation.parallel.ExplainerQueue
-
on_run()#
-See pytools.parallelization.JobQueue.on_run()
+-
-
-X: numpy.ndarray[Any, numpy.dtype[Any]]#
+X: numpy.ndarray[Any, numpy.dtype[Any]]#
the feature values of the observations to be explained
@@ -739,7 +739,7 @@ facet.explanation.parallel.ExplainerQueue
-
-y: Optional[numpy.ndarray[Any, numpy.dtype[Any]]]#
+y: Optional[numpy.ndarray[Any, numpy.dtype[Any]]]#
the target values of the observations to be explained
diff --git a/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ParallelExplainer.html b/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ParallelExplainer.html
index 5027b086..e17a1b67 100644
--- a/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ParallelExplainer.html
+++ b/docs/apidoc/facet/explanation/parallel/facet.explanation.parallel.ParallelExplainer.html
@@ -601,7 +601,7 @@ facet.explanation.parallel.ParallelExplainer
- Bases
-ParallelizableMixin
, BaseExplainer
+-
- Metaclasses
-
@@ -725,15 +725,15 @@
facet.explanation.parallel.ParallelExplainer
- Parameters
-X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
+
X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
model’s output
-y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
+
y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
functions (optional)
kwargs (Any
) – additional arguments specific to the explainer implementation
- Return type
-Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
+Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
- Returns
SHAP values as an array of shape
@@ -750,15 +750,15 @@
facet.explanation.parallel.ParallelExplainer
- Parameters
-X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
+
X (Union
[ndarray
[Any
, dtype
[Any
]], DataFrame
, Pool
]) – matrix of samples (# samples x # features) on which to explain the
model’s output
-y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
+
y (Union
[ndarray
[Any
, dtype
[Any
]], Series
, None
]) – array of label values for each sample, used when explaining loss
functions (optional)
kwargs (Any
) – additional arguments specific to the explainer implementation
- Return type
-Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
+Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]
- Returns
SHAP values as an array of shape (n_observations, n_features);
diff --git a/docs/apidoc/facet/facet.explanation.html b/docs/apidoc/facet/facet.explanation.html
index 0a47e6a0..79f6ac72 100644
--- a/docs/apidoc/facet/facet.explanation.html
+++ b/docs/apidoc/facet/facet.explanation.html
@@ -626,13 +626,13 @@
ClassesExplainer
instances that use Python functions as the underlying model.
-A factory constructing KernelExplainer
instances.
+A factory constructing KernelExplainer
instances.
A factory constructing Permutation
explainer instances.
-A factory constructing TreeExplainer
instances.
+A factory constructing TreeExplainer
instances.
diff --git a/docs/apidoc/facet/facet.inspection.html b/docs/apidoc/facet/facet.inspection.html
index 9165aa8f..d50993a0 100644
--- a/docs/apidoc/facet/facet.inspection.html
+++ b/docs/apidoc/facet/facet.inspection.html
@@ -623,7 +623,7 @@ Classes
-Explain an sklearndf
regressor or classifier based on SHAP values.
+Explain an sklearndf
regressor or classifier based on SHAP values.
Explain a native scikit-learn regressor or classifier based on SHAP values.
diff --git a/docs/apidoc/facet/inspection/base/facet.inspection.base.ModelInspector.html b/docs/apidoc/facet/inspection/base/facet.inspection.base.ModelInspector.html
index 2e65bda3..7faa9dca 100644
--- a/docs/apidoc/facet/inspection/base/facet.inspection.base.ModelInspector.html
+++ b/docs/apidoc/facet/inspection/base/facet.inspection.base.ModelInspector.html
@@ -630,7 +630,7 @@ facet.inspection.base.ModelInspector
- Bases
-ParallelizableMixin
, FittableMixin
[Sample
]
+-
- Generic types
~T_Model
@@ -761,7 +761,7 @@ facet.inspection.base.ModelInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature associations; list of linkage trees
@@ -803,7 +803,7 @@
facet.inspection.base.ModelInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature association matrix as a data frame of shape
@@ -826,7 +826,7 @@
facet.inspection.base.ModelInspectorReturn type
--
+
-
- Returns
a series of length n_features for single-output models, or a
@@ -872,7 +872,7 @@
facet.inspection.base.ModelInspector
- Return type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
relative shap interaction values as a data frame of shape
@@ -891,7 +891,7 @@
facet.inspection.base.ModelInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature redundancies; list of linkage trees
@@ -932,7 +932,7 @@
facet.inspection.base.ModelInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature redundancy matrix as a data frame of shape
@@ -951,7 +951,7 @@
facet.inspection.base.ModelInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature synergies; list of linkage trees
@@ -992,7 +992,7 @@
facet.inspection.base.ModelInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature synergy matrix as a data frame of shape
@@ -1034,10 +1034,10 @@
facet.inspection.base.ModelInspector
- Parameters
-features (Union
[DataFrame
, Series
]) – features to preprocess
+features (Union
[DataFrame
, Series
]) – features to preprocess
- Return type
--
+
-
- Returns
preprocessed features
@@ -1055,7 +1055,7 @@ facet.inspection.base.ModelInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP interaction values
@@ -1107,7 +1107,7 @@ facet.inspection.base.ModelInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP values
diff --git a/docs/apidoc/facet/inspection/facet.inspection.FunctionInspector.html b/docs/apidoc/facet/inspection/facet.inspection.FunctionInspector.html
index 40f9cd31..386f3689 100644
--- a/docs/apidoc/facet/inspection/facet.inspection.FunctionInspector.html
+++ b/docs/apidoc/facet/inspection/facet.inspection.FunctionInspector.html
@@ -628,7 +628,7 @@ facet.inspection.FunctionInspectorModelInspector
[~T_Function]
- Generic types
-~T_Function(bound= Callable
[[typing.Union[pandas.core.series.Series, pandas.core.frame.DataFrame, numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]]]
, Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]])
+~T_Function(bound= Callable
[[typing.Union[pandas.core.series.Series, pandas.core.frame.DataFrame, numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]]]
, Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]])
- Metaclasses
-
@@ -767,7 +767,7 @@
facet.inspection.FunctionInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature associations; list of linkage trees
@@ -809,7 +809,7 @@
facet.inspection.FunctionInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature association matrix as a data frame of shape
@@ -832,7 +832,7 @@
facet.inspection.FunctionInspectorReturn type
--
+
-
- Returns
a series of length n_features for single-output models, or a
@@ -878,7 +878,7 @@
facet.inspection.FunctionInspector
- Return type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
relative shap interaction values as a data frame of shape
@@ -897,7 +897,7 @@
facet.inspection.FunctionInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature redundancies; list of linkage trees
@@ -938,7 +938,7 @@
facet.inspection.FunctionInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature redundancy matrix as a data frame of shape
@@ -957,7 +957,7 @@
facet.inspection.FunctionInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature synergies; list of linkage trees
@@ -998,7 +998,7 @@
facet.inspection.FunctionInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature synergy matrix as a data frame of shape
@@ -1040,10 +1040,10 @@
facet.inspection.FunctionInspector
- Parameters
-features (Union
[DataFrame
, Series
]) – features to preprocess
+features (Union
[DataFrame
, Series
]) – features to preprocess
- Return type
--
+
-
- Returns
preprocessed features
@@ -1061,7 +1061,7 @@ facet.inspection.FunctionInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP interaction values
@@ -1113,7 +1113,7 @@ facet.inspection.FunctionInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP values
diff --git a/docs/apidoc/facet/inspection/facet.inspection.LearnerInspector.html b/docs/apidoc/facet/inspection/facet.inspection.LearnerInspector.html
index b3f800f3..783c7c27 100644
--- a/docs/apidoc/facet/inspection/facet.inspection.LearnerInspector.html
+++ b/docs/apidoc/facet/inspection/facet.inspection.LearnerInspector.html
@@ -597,7 +597,7 @@ facet.inspection.LearnerInspector
-
class facet.inspection.LearnerInspector(model, *, explainer_factory=None, shap_interaction=True, n_jobs=None, shared_memory=None, pre_dispatch=None, verbose=None)[source]#
-Explain an sklearndf
regressor or classifier based on SHAP values.
+Explain an sklearndf
regressor or classifier based on SHAP values.
Focus is on explaining the overall model, but the inspector also delivers
SHAP explanations of the individual observations.
Available inspection methods are:
@@ -628,7 +628,7 @@ facet.inspection.LearnerInspectorModelInspector
[~T_SupervisedLearner]
- Generic types
-~T_SupervisedLearnerDF(bound= SupervisedLearnerDF
)
+~T_SupervisedLearnerDF(bound= SupervisedLearnerDF
)
- Metaclasses
-
@@ -636,8 +636,8 @@
facet.inspection.LearnerInspectorParameters
model (LearnerInspector
) – the learner or learner pipeline to inspect (typically, one of
-a ClassifierPipelineDF
,
-RegressorPipelineDF
,
+a ClassifierPipelineDF
,
+RegressorPipelineDF
,
ClassifierDF
, or
RegressorDF
)
explainer_factory (Optional
[ExplainerFactory
[Union
[RegressorMixin
, ClassifierMixin
]]]) – optional function that creates a shap Explainer
@@ -774,7 +774,7 @@
facet.inspection.LearnerInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature associations; list of linkage trees
@@ -816,7 +816,7 @@
facet.inspection.LearnerInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature association matrix as a data frame of shape
@@ -839,7 +839,7 @@
facet.inspection.LearnerInspectorReturn type
--
+
-
- Returns
a series of length n_features for single-output models, or a
@@ -885,7 +885,7 @@
facet.inspection.LearnerInspector
- Return type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
relative shap interaction values as a data frame of shape
@@ -904,7 +904,7 @@
facet.inspection.LearnerInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature redundancies; list of linkage trees
@@ -945,7 +945,7 @@
facet.inspection.LearnerInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature redundancy matrix as a data frame of shape
@@ -964,7 +964,7 @@
facet.inspection.LearnerInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature synergies; list of linkage trees
@@ -1005,7 +1005,7 @@
facet.inspection.LearnerInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature synergy matrix as a data frame of shape
@@ -1047,10 +1047,10 @@
facet.inspection.LearnerInspector
- Parameters
-features (Union
[DataFrame
, Series
]) – features to preprocess
+features (Union
[DataFrame
, Series
]) – features to preprocess
- Return type
--
+
-
- Returns
preprocessed features
@@ -1068,7 +1068,7 @@ facet.inspection.LearnerInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP interaction values
@@ -1120,7 +1120,7 @@ facet.inspection.LearnerInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP values
diff --git a/docs/apidoc/facet/inspection/facet.inspection.NativeLearnerInspector.html b/docs/apidoc/facet/inspection/facet.inspection.NativeLearnerInspector.html
index 57b16c5c..3fe701df 100644
--- a/docs/apidoc/facet/inspection/facet.inspection.NativeLearnerInspector.html
+++ b/docs/apidoc/facet/inspection/facet.inspection.NativeLearnerInspector.html
@@ -771,7 +771,7 @@ facet.inspection.NativeLearnerInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature associations; list of linkage trees
@@ -813,7 +813,7 @@
facet.inspection.NativeLearnerInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature association matrix as a data frame of shape
@@ -836,7 +836,7 @@
facet.inspection.NativeLearnerInspectorReturn type
--
+
-
- Returns
a series of length n_features for single-output models, or a
@@ -882,7 +882,7 @@
facet.inspection.NativeLearnerInspector
- Return type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
relative shap interaction values as a data frame of shape
@@ -901,7 +901,7 @@
facet.inspection.NativeLearnerInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature redundancies; list of linkage trees
@@ -942,7 +942,7 @@
facet.inspection.NativeLearnerInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature redundancy matrix as a data frame of shape
@@ -961,7 +961,7 @@
facet.inspection.NativeLearnerInspector
- Return type
-Union
[LinkageTree
, List
[LinkageTree
]]
+-
- Returns
linkage tree of feature synergies; list of linkage trees
@@ -1002,7 +1002,7 @@
facet.inspection.NativeLearnerInspectorReturn type
-Union
[Matrix
[float64
], List
[Matrix
[float64
]]]
+-
- Returns
feature synergy matrix as a data frame of shape
@@ -1044,10 +1044,10 @@
facet.inspection.NativeLearnerInspector
- Parameters
-features (Union
[DataFrame
, Series
]) – features to preprocess
+features (Union
[DataFrame
, Series
]) – features to preprocess
- Return type
--
+
-
- Returns
preprocessed features
@@ -1065,7 +1065,7 @@ facet.inspection.NativeLearnerInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP interaction values
@@ -1117,7 +1117,7 @@ facet.inspection.NativeLearnerInspector
- Return type
-Union
[DataFrame
, List
[DataFrame
]]
+-
- Returns
a data frame with SHAP values
diff --git a/docs/apidoc/facet/inspection/facet.inspection.ShapPlotData.html b/docs/apidoc/facet/inspection/facet.inspection.ShapPlotData.html
index 555a3694..80645e0b 100644
--- a/docs/apidoc/facet/inspection/facet.inspection.ShapPlotData.html
+++ b/docs/apidoc/facet/inspection/facet.inspection.ShapPlotData.html
@@ -600,7 +600,7 @@ facet.inspection.ShapPlotData
- Parameters
-shap_values (Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]) – the shap values for all observations and outputs
+shap_values (Union
[ndarray
[Any
, dtype
[float64
]], List
[ndarray
[Any
, dtype
[float64
]]]]) – the shap values for all observations and outputs
sample (Sample
) – (sub)sample of all observations for which SHAP values are
available; aligned with param shap_values
@@ -627,36 +627,36 @@ facet.inspection.ShapPlotDataDefinitions
-
-property features: pandas.DataFrame#
+property features: pandas.DataFrame#
Matrix of feature values (number of observations by number of features).
-
-property shap_values: Union[numpy.ndarray[Any, numpy.dtype[numpy.float64]], List[numpy.ndarray[Any, numpy.dtype[numpy.float64]]]]#
+property shap_values: Union[numpy.ndarray[Any, numpy.dtype[numpy.float64]], List[numpy.ndarray[Any, numpy.dtype[numpy.float64]]]]#
Matrix of SHAP values (number of observations by number of features)
or list of shap value matrices for multi-output models.
-
-property target: Union[pandas.Series, pandas.DataFrame]#
+property target: Union[pandas.Series, pandas.DataFrame]#
Series of target values (number of observations)
or matrix of target values for multi-output models
(number of observations by number of outputs).
diff --git a/docs/apidoc/facet/inspection/shap/facet.inspection.shap.FunctionShapCalculator.html b/docs/apidoc/facet/inspection/shap/facet.inspection.shap.FunctionShapCalculator.html
index 25a38e28..07353aff 100644
--- a/docs/apidoc/facet/inspection/shap/facet.inspection.shap.FunctionShapCalculator.html
+++ b/docs/apidoc/facet/inspection/shap/facet.inspection.shap.FunctionShapCalculator.html
@@ -603,7 +603,7 @@ facet.inspection.shap.FunctionShapCalculatorShapCalculator
[~T_ModelFunction]
- Generic types
-~T_ModelFunction(bound= Callable
[[typing.Union[pandas.core.series.Series, pandas.core.frame.DataFrame, numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]]]
, Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]])
+~T_ModelFunction(bound= Callable
[[typing.Union[pandas.core.series.Series, pandas.core.frame.DataFrame, numpy.ndarray[typing.Any, numpy.dtype[numpy.float64]]]]
, Union
[Series
, ndarray
[Any
, dtype
[float64
]], float
]])
- Metaclasses
-
@@ -706,7 +706,7 @@
facet.inspection.shap.FunctionShapCalculator
- Parameters
-
@@ -729,7 +729,7 @@ facet.inspection.shap.FunctionShapCalculator
- Parameters
-features (DataFrame
) – the feature matrix to validate
+features (DataFrame
) – the feature matrix to validate
- Raises
ValueError – if the feature matrix is not compatible with this
@@ -765,7 +765,7 @@
facet.inspection.shap.FunctionShapCalculator
-
-property main_effects: pandas.DataFrame#
+property main_effects: pandas.DataFrame#
The main effects per observation and featuren (i.e., the diagonals of the
interaction matrices), with shape
\((n_\mathrm{observations}, n_\mathrm{outputs} \cdot n_\mathrm{features})\).
@@ -774,7 +774,7 @@ facet.inspection.shap.FunctionShapCalculatorAttributeError – this SHAP calculator does not support interaction values
- Return type
--
+
-
@@ -792,7 +792,7 @@ facet.inspection.shap.FunctionShapCalculator
-
-property shap_interaction_values: pandas.DataFrame#
+property shap_interaction_values: pandas.DataFrame#
The SHAP interaction values per observation and feature pair, with shape
\((n_\mathrm{observations} \cdot n_\mathrm{features}, n_\mathrm{outputs}
\cdot n_\mathrm{features})\)
@@ -801,19 +801,19 @@ facet.inspection.shap.FunctionShapCalculatorAttributeError – this SHAP calculator does not support interaction values
- Return type
--
+
-
-
-property shap_values: pandas.DataFrame#
+property shap_values: pandas.DataFrame#
The SHAP values per observation and feature, with shape
\((n_\mathrm{observations}, n_\mathrm{outputs} \cdot n_\mathrm{features})\)