STRM Privacy Diagnostics for reporting privacy metrics on a dataset.
Project description
STRM Privacy Diagnostics
This package contains diagnostics for your data, by means of computing k-Anonymity, l-Diversity and t-Closeness.
You can compute the scores by passing your data and indicating which columns are quasi-identifiers and sensitive attributes.
A 'quasi identifier' is a data attribute on an individual that together with other attributes could identify them. E.g. your length probably doesn't discern you from a larger group of people, but the combination of your length, age and city of birth will if someone has some knowledge about you.
A 'sensitive attribute' is a sensitive data point, like a specific medical diagnosis or credit score.
Installation
Install the package via Pip:
pip install strmprivacy-diagnostics
Usage
Simply import the package and
- point it to your input data
- calculate the statistics by passing the quasi identifiers and sensitive attributes
- print a report by passing the quasi identifiers and sensitive attributes
from strmprivacy.diagnostics import PrivacyDiagnostics
# create an instance of the diagnostics class
d = PrivacyDiagnostics("/path/to/csv")
# calculate the statistics
d.calculate_stats(
qi=['qi1', 'qi2', ...], # names of quasi identifier columns,
sa=['sa1', 'sa2', ...], # names of sensitive attributes
)
# create report
d.create_report(
qi=['qi1', 'qi2', ...], # names of quasi identifier columns,
sa=['sa1', 'sa2', ...], # names of sensitive attributes
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for strmprivacy-diagnostics-1.1.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1c023acfac756ad14931b43da064f22d1dbffd3d3ba9a1f92f6625cf9726828 |
|
MD5 | c6564718ce2d837b1c21965b08ff250a |
|
BLAKE2b-256 | 3a67e24fc8b5eecea6a54592d55c3d8ef138830b63bd51814e956363e77e04a4 |
Hashes for strmprivacy_diagnostics-1.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbf8fa6526e0225d1c042c99d8b39e8d9e43901f494706e81da280887428b274 |
|
MD5 | 47b18c6d4b22c813e763699d26ba669d |
|
BLAKE2b-256 | df573b11ca81caced8d0bd697ba99f714f90a0105d98a55e4d9ecfa8310a5df5 |