mirror of
https://github.com/IBM/ai-privacy-toolkit.git
synced 2026-05-07 19:12:39 +02:00
add minimization notebook (#22)
* add german credit notebook to showcase new features (minimize only some features and categorical features) * add notebook to show minimization data on a regression problem
This commit is contained in:
parent
9de078f937
commit
752871dd0c
3 changed files with 648 additions and 1 deletions
|
|
@ -510,7 +510,7 @@ def test_regression():
|
|||
transformed = gen.transform(x_train)
|
||||
print('Base model accuracy (R2 score): ', model.score(x_test, y_test))
|
||||
model.fit(transformed, y_train)
|
||||
print('Base model accuracy (R2 score) after anonymization: ', model.score(x_test, y_test))
|
||||
print('Base model accuracy (R2 score) after minimization: ', model.score(x_test, y_test))
|
||||
gener = gen.generalizations_
|
||||
expexted_generalizations = {'ranges': {
|
||||
'age': [-0.07816532626748085, -0.07090024650096893, -0.05637009255588055, -0.05092128552496433,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue