From 5223ad1f5ad7d2e1337ea782f35f3ce3218c93e5 Mon Sep 17 00:00:00 2001 From: abigailt Date: Mon, 12 Jul 2021 15:43:46 +0300 Subject: [PATCH] Update version and documentation --- apt/minimization/__init__.py | 12 ++++++++++++ docs/conf.py | 2 +- docs/index.rst | 12 ++++++++---- docs/source/apt.anonymization.rst | 12 ++++++------ docs/source/apt.rst | 16 ++++++++-------- docs/source/tests.rst | 20 ++++++++++++++------ 6 files changed, 49 insertions(+), 25 deletions(-) diff --git a/apt/minimization/__init__.py b/apt/minimization/__init__.py index 37cd1c4..e9aa35d 100644 --- a/apt/minimization/__init__.py +++ b/apt/minimization/__init__.py @@ -1,7 +1,19 @@ """ Module providing data minimization for ML. +This module implements a first-of-a-kind method to help reduce the amount of personal data needed to perform +predictions with a machine learning model, by removing or generalizing some of the input features. For more information +about the method see: http://export.arxiv.org/pdf/2008.04113 +The main class, ``GeneralizeToRepresentative``, is a scikit-learn compatible ``Transformer``, that receives an existing +estimator and labeled training data, and learns the generalizations that can be applied to any newly collected data for +analysis by the original model. The ``fit()`` method learns the generalizations and the ``transform()`` method applies +them to new data. + +It is also possible to export the generalizations as feature ranges. + +The current implementation supports only numeric features, so any categorical features must be transformed to a numeric +representation before using this class. """ from apt.minimization.minimizer import GeneralizeToRepresentative diff --git a/docs/conf.py b/docs/conf.py index a1843e1..b4dab01 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -22,7 +22,7 @@ copyright = '2021, IBM' author = 'Abigail Goldsteen' # The full version, including alpha/beta/rc tags -release = '0.0.1' +release = '0.0.3' # -- General configuration --------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index be954dc..6a1969d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -8,12 +8,16 @@ Welcome to ai-privacy-toolkit's documentation! This project provides tools for assessing and improving the privacy and compliance of AI models. -The first release of this toolkit contains a single module called anonymization. This -module contains methods for anonymizing ML model training data, so that when -a model is retrained on the anonymized data, the model itself will also be considered -anonymous. This may help exempt the model from different obligations and restrictions +The anonymization module contains methods for anonymizing ML model +training data, so that when a model is retrained on the anonymized data, the model itself will also be +considered anonymous. This may help exempt the model from different obligations and restrictions set out in data protection regulations such as GDPR, CCPA, etc. +The minimization module contains methods to help adhere to the data +minimization principle in GDPR for ML models. It enables to reduce the amount of +personal data needed to perform predictions with a machine learning model, while still enabling the model +to make accurate predictions. This is done by by removing or generalizing some of the input features. + .. toctree:: :maxdepth: 2 :caption: Getting Started: diff --git a/docs/source/apt.anonymization.rst b/docs/source/apt.anonymization.rst index 6453554..727706b 100644 --- a/docs/source/apt.anonymization.rst +++ b/docs/source/apt.anonymization.rst @@ -8,15 +8,15 @@ apt.anonymization.anonymizer module ----------------------------------- .. automodule:: apt.anonymization.anonymizer - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: apt.anonymization - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/apt.rst b/docs/source/apt.rst index 372f81e..fbe1c02 100644 --- a/docs/source/apt.rst +++ b/docs/source/apt.rst @@ -5,9 +5,9 @@ Subpackages ----------- .. toctree:: - :maxdepth: 4 - apt.anonymization + apt.anonymization + apt.minimization Submodules ---------- @@ -16,15 +16,15 @@ apt.utils module ---------------- .. automodule:: apt.utils - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: apt - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/source/tests.rst b/docs/source/tests.rst index 3983caf..b1428e0 100644 --- a/docs/source/tests.rst +++ b/docs/source/tests.rst @@ -8,15 +8,23 @@ tests.test\_anonymizer module ----------------------------- .. automodule:: tests.test_anonymizer - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: + +tests.test\_minimizer module +---------------------------- + +.. automodule:: tests.test_minimizer + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: tests - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: