Bayes Vulnerability for Microdata library
Project description
BVM library
Quantitative Information Flow assessment of vulnerability for microdata datasets using Bayes Vulnerability.
DOI: 10.5281/zenodo.6533704.
Installation
Use the package manager pip to install bvmlib
.
pip install bvmlib
Usage
Single-dataset
import pandas
from bvmlib.bvm import BVM
# Create a pandas DataFrame for your data.
# For instance:
df = pandas.read_csv(file.csv)
# Create an instance.
I = BVM(df)
# Assign quasi-identifying attributes.
I.qids(['attribute_1','attribute_2'])
# Assign sensitive attributes (optional).
I.sensitive(['attribute_2','attribute_3'])
# Perform vulnerability assessment.
I_results = I.assess()
# Print re-identification results.
print(I_results['re_id'])
# Print attribute-inference results (only if computed).
print(I_results['att_inf'])
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
GNU LGPLv3 [^compatibility].
[^compatibility]: To understand how the various GNU licenses are compatible with each other, please refer to:
https://www.gnu.org/licenses/gpl-faq.html#AllCompatibility
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
bvmlib-1.0.0.tar.gz
(9.4 kB
view hashes)
Built Distribution
bvmlib-1.0.0-py3-none-any.whl
(9.7 kB
view hashes)