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
File details
Details for the file strmprivacy-diagnostics-1.1.2.tar.gz
.
File metadata
- Download URL: strmprivacy-diagnostics-1.1.2.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96f4913064cd8ce69d79d43c909da196708fa346b7262b901142ac80c21d0162 |
|
MD5 | a5840cee754d857563957a0d62836e1e |
|
BLAKE2b-256 | 4f1a90a3b3e832c3f0cfe943fbf39d1c54cb9aeb79ce0523b67e535b8d6cad1d |
File details
Details for the file strmprivacy_diagnostics-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: strmprivacy_diagnostics-1.1.2-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 274784eb9a2756ea7ea012db326ba0fe94b54fa620d1eebc75d7c7de06c6a8cb |
|
MD5 | 84baa91964744b0d80b69f4d2d2651f5 |
|
BLAKE2b-256 | 7873f6ae54d942f320ae979cbefe9e40a5961ccbaa54b685b729d47c2f618a95 |