From 0f6cbf52afb153e7565239b1f323406c6e54d44d Mon Sep 17 00:00:00 2001 From: j-ittner Date: Fri, 20 Oct 2023 12:51:19 +0200 Subject: [PATCH 01/11] Rename github org to BCG-X-Official --- README.rst | 8 ++++---- condabuild/meta.yaml | 6 +++--- pypi_description.rst | 4 ++-- pyproject.toml | 4 ++-- .../auxiliary/Diabetes_getting_started_example.ipynb | 2 +- sphinx/auxiliary/Facet_sphinx_tutorial_template.ipynb | 8 ++++---- sphinx/make.py | 3 +-- sphinx/source/contribution_guide.rst | 4 ++-- sphinx/source/faqs.rst | 2 +- sphinx/source/tutorial/Classification_with_Facet.ipynb | 10 +++++----- .../source/tutorial/Model_simulation_deep_dive.ipynb | 8 ++++---- ...Scikit-learn_classifier_summaries_using_FACET.ipynb | 6 +++--- ...r_Drilling_Incident_Classification_with_Facet.ipynb | 8 ++++---- 13 files changed, 36 insertions(+), 37 deletions(-) diff --git a/README.rst b/README.rst index 573e035c..4c645928 100644 --- a/README.rst +++ b/README.rst @@ -49,7 +49,7 @@ 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 `__ | +| | `sklearndf `__ | | | [`documentation `__]| | | an augmented version of *scikit-learn* with enhanced support for | | | *pandas* data frames that ensures end-to-end traceability of features.| @@ -412,7 +412,7 @@ 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 @@ -426,7 +426,7 @@ License ------- FACET is licensed under Apache 2.0 as described in the -`LICENSE `_ file. +`LICENSE `_ file. Acknowledgements @@ -476,7 +476,7 @@ or have a look at .. |pypi| image:: https://badge.fury.io/py/gamma-facet.svg :target: https://pypi.org/project/gamma-facet/ -.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-Gamma.facet?repoName=BCG-Gamma%2Ffacet&branchName=develop +.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-X-Official.facet?repoName=BCG-Gamma%2Ffacet&branchName=develop :target: https://dev.azure.com/gamma-facet/facet/_build?definitionId=7&_a=summary .. |azure_code_cov| image:: https://img.shields.io/azure-devops/coverage/gamma-facet/facet/7/2.0.x diff --git a/condabuild/meta.yaml b/condabuild/meta.yaml index 89b991af..f12b6c6c 100644 --- a/condabuild/meta.yaml +++ b/condabuild/meta.yaml @@ -56,13 +56,13 @@ test: - pytest -vs test about: - home: https://github.com/BCG-Gamma/facet + home: https://github.com/BCG-X-Official/facet license: Apache Software License v2.0 license_file: LICENSE description: | 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. - dev_url: https://github.com/BCG-Gamma/facet + dev_url: https://github.com/BCG-X-Official/facet doc_url: https://bcg-gamma.github.io/facet/ - doc_source_url: https://github.com/BCG-Gamma/facet/blob/develop/README.rst \ No newline at end of file + doc_source_url: https://github.com/BCG-X-Official/facet/blob/develop/README.rst \ No newline at end of file diff --git a/pypi_description.rst b/pypi_description.rst index 6e92a938..03c7832b 100644 --- a/pypi_description.rst +++ b/pypi_description.rst @@ -36,7 +36,7 @@ workflow, enhancing tried and tested pipelining paradigm with new capabilities for model selection, inspection, and simulation. FACET also introduces -`sklearndf `__, an augmented +`sklearndf `__, an augmented version of *scikit-learn* with enhanced support for *pandas* data frames that ensures end-to-end traceability of features. @@ -51,7 +51,7 @@ License --------------------------- FACET is licensed under Apache 2.0 as described in the -`LICENSE `_ file. +`LICENSE `_ file. .. Begin-Badges diff --git a/pyproject.toml b/pyproject.toml index f410a9c6..85fdecdc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ exclude = [".idea", "tmp", "dist", ".tox", ".pytest_cache"] [tool.flit.metadata] module = "facet" author = "Boston Consulting Group (BCG)" -home-page = "https://github.com/BCG-Gamma/facet" +home-page = "https://github.com/BCG-X-Official/facet" description-file = "pypi_description.rst" dist-name = "gamma-facet" license = "Apache Software License v2.0" @@ -64,7 +64,7 @@ docs = [ [tool.flit.metadata.urls] Documentation = "https://bcg-gamma.github.io/facet/" -Repository = "https://github.com/BCG-Gamma/facet" +Repository = "https://github.com/BCG-X-Official/facet" [build] # comma-separated list of packages to be built from source in pip min builds diff --git a/sphinx/auxiliary/Diabetes_getting_started_example.ipynb b/sphinx/auxiliary/Diabetes_getting_started_example.ipynb index 1e84f433..9aaba75e 100644 --- a/sphinx/auxiliary/Diabetes_getting_started_example.ipynb +++ b/sphinx/auxiliary/Diabetes_getting_started_example.ipynb @@ -25,7 +25,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. " + " 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. " ] }, { diff --git a/sphinx/auxiliary/Facet_sphinx_tutorial_template.ipynb b/sphinx/auxiliary/Facet_sphinx_tutorial_template.ipynb index 20a171af..934d03df 100644 --- a/sphinx/auxiliary/Facet_sphinx_tutorial_template.ipynb +++ b/sphinx/auxiliary/Facet_sphinx_tutorial_template.ipynb @@ -43,7 +43,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", @@ -86,7 +86,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" ] }, { @@ -128,7 +128,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", @@ -152,7 +152,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/sphinx/make.py b/sphinx/make.py index 100406f9..15f21f24 100755 --- a/sphinx/make.py +++ b/sphinx/make.py @@ -9,14 +9,13 @@ if __name__ == "__main__": - # noinspection PyUnusedLocal def run_make(branch: str, working_directory: str) -> None: """Stub, overwritten by bootstrap.py""" # run the common make file available in the pytools repo with request.urlopen( - f"https://raw.githubusercontent.com/BCG-Gamma/pytools/{BRANCH}" + f"https://raw.githubusercontent.com/BCG-X-Official/pytools/{BRANCH}" f"/sphinx/base/bootstrap.py" ) as response: exec(response.read().decode("utf-8"), globals()) diff --git a/sphinx/source/contribution_guide.rst b/sphinx/source/contribution_guide.rst index 1f6467dd..c16306dd 100644 --- a/sphinx/source/contribution_guide.rst +++ b/sphinx/source/contribution_guide.rst @@ -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/sphinx/source/faqs.rst b/sphinx/source/faqs.rst index fb62b425..ae554f83 100644 --- a/sphinx/source/faqs.rst +++ b/sphinx/source/faqs.rst @@ -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/sphinx/source/tutorial/Classification_with_Facet.ipynb b/sphinx/source/tutorial/Classification_with_Facet.ipynb index 633dd449..9a61e41e 100644 --- a/sphinx/source/tutorial/Classification_with_Facet.ipynb +++ b/sphinx/source/tutorial/Classification_with_Facet.ipynb @@ -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/sphinx/source/tutorial/Model_simulation_deep_dive.ipynb b/sphinx/source/tutorial/Model_simulation_deep_dive.ipynb index 6b10d66f..6a0d540d 100644 --- a/sphinx/source/tutorial/Model_simulation_deep_dive.ipynb +++ b/sphinx/source/tutorial/Model_simulation_deep_dive.ipynb @@ -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/sphinx/source/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb b/sphinx/source/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb index 00f821d3..02385b16 100644 --- a/sphinx/source/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb +++ b/sphinx/source/tutorial/Scikit-learn_classifier_summaries_using_FACET.ipynb @@ -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/sphinx/source/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb b/sphinx/source/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb index 6289d3e0..5a02f025 100644 --- a/sphinx/source/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb +++ b/sphinx/source/tutorial/Water_Drilling_Incident_Classification_with_Facet.ipynb @@ -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." ] }, { From 4c8e403ec179d71bd051e555cec5986e1dddbef9 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Fri, 20 Oct 2023 13:38:56 +0200 Subject: [PATCH 02/11] Rename github org to BCG-X-Official --- README.rst | 16 ++++++++-------- condabuild/meta.yaml | 2 +- pypi_description.rst | 2 +- pyproject.toml | 2 +- sphinx/source/conf.py | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.rst b/README.rst index 4c645928..067267c2 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ `scikit-learn`'s native hyperparameter searchers – and improves the styling of all visualizations. - See the `release notes `__ + See the `release notes `__ for more details. @@ -50,7 +50,7 @@ FACET is composed of the following key components: | | selection, inspection, and simulation. | | | FACET also introduces | | | `sklearndf `__ | -| | [`documentation `__]| +| | [`documentation `__]| | | an augmented version of *scikit-learn* with enhanced support for | | | *pandas* data frames that ensures end-to-end traceability of features.| +-----------------+-----------------------------------------------------------------------+ @@ -107,10 +107,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 @@ -349,7 +349,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. @@ -419,7 +419,7 @@ We do ask that for any major changes please discuss these with us first via an i using our team email: FacetTeam@bcg.com. For further information on contributing please see our -`contribution guide `__. +`contribution guide `__. License @@ -446,7 +446,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 @@ -489,7 +489,7 @@ or have a look at :target: https://github.com/psf/black .. |made_with_sphinx_doc| image:: https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg - :target: https://bcg-gamma.github.io/facet/index.html + :target: https://bcg-x-official.github.io/facet/index.html .. |license_badge| image:: https://img.shields.io/badge/License-Apache%202.0-olivegreen.svg :target: https://opensource.org/licenses/Apache-2.0 diff --git a/condabuild/meta.yaml b/condabuild/meta.yaml index f12b6c6c..504b928f 100644 --- a/condabuild/meta.yaml +++ b/condabuild/meta.yaml @@ -64,5 +64,5 @@ about: model inspection and model-based simulation to enable better explanations of your supervised machine learning models. dev_url: https://github.com/BCG-X-Official/facet - doc_url: https://bcg-gamma.github.io/facet/ + doc_url: https://bcg-x-official.github.io/facet/ doc_source_url: https://github.com/BCG-X-Official/facet/blob/develop/README.rst \ No newline at end of file diff --git a/pypi_description.rst b/pypi_description.rst index 03c7832b..48279011 100644 --- a/pypi_description.rst +++ b/pypi_description.rst @@ -68,7 +68,7 @@ FACET is licensed under Apache 2.0 as described in the :target: https://github.com/psf/black .. |made_with_sphinx_doc| image:: https://img.shields.io/badge/Made%20with-Sphinx-1f425f.svg - :target: https://bcg-gamma.github.io/facet/index.html + :target: https://bcg-x-official.github.io/facet/index.html .. |license_badge| image:: https://img.shields.io/badge/License-Apache%202.0-olivegreen.svg :target: https://opensource.org/licenses/Apache-2.0 diff --git a/pyproject.toml b/pyproject.toml index 85fdecdc..bd56dd20 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,7 +63,7 @@ docs = [ ] [tool.flit.metadata.urls] -Documentation = "https://bcg-gamma.github.io/facet/" +Documentation = "https://bcg-x-official.github.io/facet/" Repository = "https://github.com/BCG-X-Official/facet" [build] diff --git a/sphinx/source/conf.py b/sphinx/source/conf.py index 84d594f1..1ebb33fb 100644 --- a/sphinx/source/conf.py +++ b/sphinx/source/conf.py @@ -19,9 +19,9 @@ project="facet", html_logo=os.path.join("_images", "Gamma_Facet_Logo_RGB_LB.svg"), intersphinx_mapping={ - "pytools": ("https://bcg-gamma.github.io/pytools/", None), + "pytools": ("https://bcg-x-official.github.io/pytools/", None), "shap": ("https://shap.readthedocs.io/en/stable", None), "sklearn": ("https://scikit-learn.org/stable", None), - "sklearndf": ("https://bcg-gamma.github.io/sklearndf/", None), + "sklearndf": ("https://bcg-x-official.github.io/sklearndf/", None), }, ) From ba5cb980b0bb2583aaa47cde466d90a45babfe42 Mon Sep 17 00:00:00 2001 From: Jan Ittner Date: Fri, 20 Oct 2023 13:44:53 +0200 Subject: [PATCH 03/11] Update README.rst --- README.rst | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/README.rst b/README.rst index 067267c2..b1d442f3 100644 --- a/README.rst +++ b/README.rst @@ -1,18 +1,5 @@ .. image:: sphinx/source/_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. From a5c75ec3dd7a04a25ab1dd918b5f0052e5aaa6c1 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Fri, 20 Oct 2023 17:13:27 +0200 Subject: [PATCH 04/11] Rename github org to BCG-X-Official --- README.rst | 2 +- azure-pipelines.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.rst b/README.rst index 067267c2..dc837138 100644 --- a/README.rst +++ b/README.rst @@ -476,7 +476,7 @@ or have a look at .. |pypi| image:: https://badge.fury.io/py/gamma-facet.svg :target: https://pypi.org/project/gamma-facet/ -.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-X-Official.facet?repoName=BCG-Gamma%2Ffacet&branchName=develop +.. |azure_build| image:: https://dev.azure.com/gamma-facet/facet/_apis/build/status/BCG-X-Official.facet?repoName=BCG-X-Official%2Ffacet&branchName=develop :target: https://dev.azure.com/gamma-facet/facet/_build?definitionId=7&_a=summary .. |azure_code_cov| image:: https://img.shields.io/azure-devops/coverage/gamma-facet/facet/7/2.0.x diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a0a12333..4fa28897 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -24,8 +24,8 @@ resources: repositories: - repository: pytools type: github - endpoint: BCG-Gamma - name: BCG-Gamma/pytools + endpoint: BCG-X-Official + name: BCG-X-Official/pytools ref: 2.1.x variables: From e673acbc2b50220300e3c4554cd21ae611716b52 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Wed, 8 Nov 2023 14:51:42 +0100 Subject: [PATCH 05/11] FIX: replace call to deprecated Axes.get_text_heights() --- .pre-commit-config.yaml | 4 +-- RELEASE_NOTES.rst | 2 ++ src/facet/simulation/viz/_style.py | 47 +++++++++++++++++++++--------- 3 files changed, 37 insertions(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 02cbedf3..46feca8e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 23.10.0 hooks: - id: black language: python @@ -41,6 +41,6 @@ repos: language: python language_version: python39 additional_dependencies: - - numpy~=1.22 + - numpy~=1.24 - gamma-pytools~=2.1 - sklearndf~=2.2 diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index 4798cd01..896a48c5 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -25,6 +25,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/src/facet/simulation/viz/_style.py b/src/facet/simulation/viz/_style.py index 92c10feb..9c9780c4 100644 --- a/src/facet/simulation/viz/_style.py +++ b/src/facet/simulation/viz/_style.py @@ -4,9 +4,10 @@ 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 @@ -203,27 +204,44 @@ def _make_sub_axes() -> Axes: 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 @@ -234,6 +252,7 @@ def _x_axis_height() -> float: * (1 + SimulationMatplotStyle.__HISTOGRAM_SIZE_RATIO) ), ) + return sub_axes ax = _make_sub_axes() @@ -246,10 +265,10 @@ def _x_axis_height() -> float: # 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)), ) From beecd1f9dad27c6c9cfe447ecda1d9fdbeb3ee87 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Thu, 9 Nov 2023 09:35:20 +0100 Subject: [PATCH 06/11] BUILD: update black to 23.10.1 --- .pre-commit-config.yaml | 2 +- azure-pipelines.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 46feca8e..68390b17 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: isort - repo: https://github.com/psf/black - rev: 23.10.0 + rev: 23.10.1 hooks: - id: black language: python diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4fa28897..8bdd9dae 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -65,7 +65,7 @@ stages: versionSpec: '3.9' displayName: 'use Python 3.9' - script: | - python -m pip install black~=22.8 + python -m pip install black~=23.10.1 python -m black --check . displayName: 'Run black' - job: From 876c2e29bc2121f17d8069f621cb883ba1bce4b8 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Thu, 9 Nov 2023 11:31:54 +0100 Subject: [PATCH 07/11] BUILD: update versions in environment.yml --- environment.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/environment.yml b/environment.yml index 501f6843..6a64fab7 100644 --- a/environment.yml +++ b/environment.yml @@ -5,17 +5,18 @@ channels: dependencies: # run - gamma-pytools ~= 2.1 - - joblib ~= 1.2 + - joblib ~= 1.3 - lightgbm ~= 3.3 - - matplotlib ~= 3.7 - - numpy ~= 1.24 + - matplotlib ~= 3.8 + - numpy ~= 1.26 - pandas ~= 2.0 - - python ~= 3.9 - - scikit-learn ~= 1.2.0 - - scipy ~= 1.10 - - shap ~= 0.41 + - python ~= 3.11 + - scikit-learn ~= 1.2.2 + - scipy ~= 1.11 + - shap ~= 0.43 - sklearndf ~= 2.2 - - typing_extensions ~= 4.3 + - typing_extensions ~= 4.6 + - xlrd ~= 2.0 # additional packages for notebooks etc. - pip ~= 23.0 - pip: @@ -30,7 +31,7 @@ dependencies: - pydata-sphinx-theme ~= 0.8.1 # notebooks - ipywidgets ~= 8.0 - - jupyterlab ~= 3.5 + - jupyterlab ~= 4.0 - openpyxl ~= 3.0 - seaborn ~= 0.12 - - tableone ~= 0.7 + - tableone ~= 0.8 From 3a5da890f6de88596ea030fde71d573a7dc38f10 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Mon, 13 Nov 2023 20:09:44 +0100 Subject: [PATCH 08/11] DOC: update release notes --- RELEASE_NOTES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index ff63be07..0ce1164d 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -17,6 +17,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 ~~~~~ From 093eafceb6d1febcf13e6027f2ed47e0b2c23eac Mon Sep 17 00:00:00 2001 From: j-ittner Date: Tue, 14 Nov 2023 06:25:55 -0500 Subject: [PATCH 09/11] FIX: fetch required doc branches from remote before checking them out --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8bdd9dae..517be2d3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -655,6 +655,7 @@ stages: cd $(System.DefaultWorkingDirectory) echo "Checking out github-pages" + git fetch origin github-pages --depth=1 git checkout --track origin/github-pages # make sure we have a docs directory @@ -676,6 +677,7 @@ stages: cd $(System.DefaultWorkingDirectory) echo "Checking out $(branchName)" + git fetch origin $(branchName) --depth=1 git checkout $(branchName) # install micromamba From 55b451cfcf239e26ef9cafeb59d1fe3e07bf026a Mon Sep 17 00:00:00 2001 From: j-ittner Date: Tue, 14 Nov 2023 17:55:43 -0500 Subject: [PATCH 10/11] BUILD: update version to 2.0.2 --- src/facet/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/facet/__init__.py b/src/facet/__init__.py index 1843b247..d258ac1f 100644 --- a/src/facet/__init__.py +++ b/src/facet/__init__.py @@ -6,7 +6,7 @@ """ -__version__ = "2.0.1" +__version__ = "2.0.2" __logo__ = ( r""" From 328ee53460ffdc37b920bc91626ea9467b546b93 Mon Sep 17 00:00:00 2001 From: j-ittner Date: Wed, 15 Nov 2023 10:07:48 -0500 Subject: [PATCH 11/11] BUILD: update version to 2.1.1 --- src/facet/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/facet/__init__.py b/src/facet/__init__.py index d8d5475f..fb245180 100644 --- a/src/facet/__init__.py +++ b/src/facet/__init__.py @@ -6,7 +6,7 @@ """ -__version__ = "2.1.0" +__version__ = "2.1.1" __logo__ = ( r"""