integrated re-identification risk into python pandas
Go to file
steve 7d82cc6e3a Update 'README.md' 2019-03-05 12:18:11 -06:00
src deployment branch 2019-03-05 11:58:48 -06:00
README.md Update 'README.md' 2019-03-05 12:18:11 -06:00

README.md

Re-Identification Risk

This framework computes re-identification risk of a dataset by extending pandas. It works like a pandas add-on The framework will compute the following risk measures: marketer, prosecutor, journalist and pitman risk. There are two modes available :

explore:

    Here the assumption is that we are not sure of the attributes to be disclosed, 
    The framework will explore a variety of combinations and associate risk measures every random combinations it can come up with

evaluation

    Here the assumption is that we are clear on the sets of attributes to be used and we are interested in computing the associated risk.

Four risk measures are computed :

- Marketer risk
- Prosecutor risk
- Journalist risk
- Pitman Risk

Usage:

The framework will depend on pandas and numpy (for now)

import numpy as np
import pandas as pd
from pandas_risk import *

mydf = pd.DataFrame({"x":np.random.choice( np.random.randint(1,10),50),"y":np.random.choice( np.random.randint(1,10),50) })
print mydf.risk.evaluate()



#
# computing journalist and pitman
#   - Insure the population size is much greater than the sample size 
#   - Insure the fields are identical in both sample and population
#
pop = pd.DataFrame({"x":np.random.choice( np.random.randint(1,10),150),"y":np.random.choice( np.random.randint(1,10),150) ,"q":np.random.choice( np.random.randint(1,10),150)})
mydf.risk.evaluate(pop=pop)

References :

[http://ehelthinformation.ca] (http://www.ehealthinformation.ca/wp-content/uploads/2014/08/2009-De-identification-PA-whitepaper1.pdf)

https://www.scb.se/contentassets

@TODO: - Evaluation of how sparse attributes are (the ratio of non-null over rows) - Have a smart way to drop attributes (based on the above in random policy search) Basic examples that illustrate usage of the the framework are in the notebook folder. The example is derived from