Commit graph

15 commits

Author SHA1 Message Date
abigailgold
5dce961092
Support 1-hot encoded features in anonymization + fixes related to encoding in minimization (#86)
* Support 1-hot encoded features in anonymization (#72)
* Fix anonymization adult notebook + new notebook to demonstrate anonymization on 1-hot encoded data

* Minimizer: No default encoder, if none provided data is supplied to the model as is. Fix data type of representative values. Fix and add more tests.

Signed-off-by: abigailt <abigailt@il.ibm.com>
2023-10-19 11:48:15 +03:00
abigailgold
13a0567183
Make data minimization more consistent and performant (#83)
* Update requirements

* Update incompatible scipy version

* Reduce runtime of dataset assessment tests

* ncp is now a class that contains 3 values: fit_score, transform_score and generalizations_score so that it doesn't matter in what order the different methods are called, all calculated ncp scores are stored.
Generalizations can now be applied either from tree cells or from global generalizations struct depending on the value of generalize_using_transform. Representative values can also be computed from global generalizations.
Removing a feature from the generalization can also be applied in either mode.

* Compute generalizations with test data when possible (for computing better representatives).

* Externalize common test code to methods.
2023-08-21 18:39:15 +03:00
abigailgold
d52fcd0041
Formatting (#68)
Fix most flake/lint errors and ignore a few others

Signed-off-by: abigailt <abigailt@il.ibm.com>
2022-12-25 15:13:57 +02:00
abigailgold
fe676fa426
New model wrappers (#32)
* keras wrapper + blackbox classifier wrapper (fix #7)

* fix error in NCP calculation

* Update notebooks

* Fix #25 (incorrect attack_feature indexes for social feature in notebook)

* Consistent naming of internal parameters
2022-05-12 15:44:29 +03:00
abigailgold
fd6be8e778
Documentation updates (#29)
* Bump version to 0.1.0 (breaking changes to some APIs)

* Update documentation

* Update requirements

* gitignore
2022-05-02 11:46:18 +03:00
abigailgold
2b2dab6bef
Data and Model wrappers (#26)
* Squashed commit of wrappers:

    Wrapper minimizer

    * apply dataset wrapper on minimizer
    * apply changes on minimization notebook
    * add black_box_access and unlimited_queries params

    Dataset wrapper anonymizer

    Add features_names to ArrayDataset
    and allow providing features names in QI and Cat features not just indexes

    update notebooks

    categorical features and QI passed by indexes
    dataset include feature names and is_pandas param

    add pytorch Dataset

    Remove redundant code.
    Use data wrappers in model wrapper APIs.

    add generic dataset components 

    Create initial version of wrappers for models

* Fix handling of categorical features
2022-04-27 12:33:27 +03:00
olasaadi
d53818644e
Build the dt on all features anon (#23)
* add param to build the DT on all features and not just on QI
* one-hot encoding only for categorical features
2022-03-07 20:12:55 +02:00
abigailt
c47819a031 Update docs 2022-02-23 19:40:11 +02:00
abigailgold
9de078f937
Update readme's with paper citations (#21) 2022-02-01 12:27:22 +02:00
olasaadi
cb9278ddb5
Support regression models (#19)
* support DecisionTreeRegressor

* support regression models

* Update membership_inference_dp_diabetes_reg.ipynb
2022-01-26 14:30:58 +02:00
olasaadi
a9a93c8a3a
Train just on qi (#15)
* QI updates
* update code to support training ML on QI features
* fix code so features that are not from QI should not be part of generalizations
and add description
* merging two branches, training on QI and on all data
* adding tests and asserts
2022-01-12 17:01:27 +02:00
abigailt
c06e2180e9 Fix images 2021-07-12 16:06:32 +03:00
abigailt
797f575252 Fix image 2021-07-12 16:05:22 +03:00
abigailgold
bcc3d67ba4
Small fix + unified approach to numpy and pandas categorical data (#2) 2021-07-11 17:42:48 +03:00
abigailt
5665c2e79d Initial commit 2021-04-28 14:00:19 +03:00