LoslegenKostenlos loslegen

Using privacy budgets

The diffprivlib package includes statistical functions to explore data, such as the case of mean(). It computes the private average of array elements. Use the functions from the tools module of diffprivlib.

Here, you will use a privacy budget accountant acc to track privacy loss when computing the private mean on the array ages from the Heart Failure Prediction dataset.

The tools module from diffprivlib and the BudgetAccountant class have already been loaded.

Diese Übung ist Teil des Kurses

Data Privacy and Anonymization in Python

Kurs anzeigen

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

# Initialize budget accountant with epsilon of 1.2
acc = ____
Code bearbeiten und ausführen