Add dataset privacy risk assessment example notebook. (#73)

* Add dataset assessment notebook and reference to module from project README

Signed-off-by: Maya Anderson <mayaa@il.ibm.com>
This commit is contained in:
andersonm-ibm 2023-05-04 12:21:42 +03:00 committed by GitHub
parent dbb958f791
commit 782edabd58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 410 additions and 1 deletions

View file

@ -87,7 +87,6 @@ class DatasetAttackMembership(DatasetAttack):
labels = np.concatenate((np.zeros((len(non_member_probabilities),)), np.ones((len(member_probabilities),))))
results = np.concatenate((non_member_probabilities, member_probabilities))
svc_disp = RocCurveDisplay.from_predictions(labels, results)
svc_disp.plot()
plt.plot([0, 1], [0, 1], color="navy", linewidth=2, linestyle="--", label='No skills')
plt.title('ROC curve')
plt.savefig(f'{filename_prefix}{dataset_name}_roc_curve.png')