Coder Social home page Coder Social logo

nothosa / dataguard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wuyucheng2002/dataguard

0.0 0.0 0.0 7.63 MB

DataGuard网站数据匿名、隐私保护模型开源代码

License: MIT License

Python 35.51% MATLAB 0.47% Jupyter Notebook 64.02%

dataguard's Introduction

“DataGuard”安全数据发布平台

平台介绍

“DataGuard”数据安全发布平台搭载了传统的数据匿名算法和新兴的基于人工智能技术的隐私保护模型,用户遵循简单操作即可实现对数据的匿名化和隐私化处理,同时得到详尽的数据效用和风险评估报告。网页链接:http://101.132.17.93/

环境依赖

pandas == 1.5.2

numpy == 1.23.5

reportlab == 3.6.12

matplotlib == 3.6.2

参数说明

参数名 格式 默认值 说明
upload str 'table/' 原始数据文件存放的文件夹
download str 'table/' 匿名后数据文件和评估报告存放的文件夹
file1 str '医保_个人基本信息.xlsx' 第一个原始数据文件文件名
file2 str None 第二个原始数据文件文件名,可不填
method str 'K' 可在'K'、'L'、'T'中选择,分别对应K-匿名性、L-多样性、T-相近性三种匿名算法
ks str '0' 不同算法的k值,若有多个,用','分割,如不填,则从2遍历至20,并推荐最优的k值
ls str '0' L-多样性算法的l值,若有多个,用','分割,如不填,则从0遍历至3,并推荐最优的l值
ts str '0.0' T-相近性算法的t值,若有多个,用','分割,如不填,则从0遍历至0.8(间隔0.2),并推荐最优的t值
target str 'aka129' 隐私属性的属性名
qid str 'aab001,ake010,akc087,aab020' 准标识符属性名,若有多个,用','分割
type str 'yb' 数据集的类型,在'yb'和'yl'中选择,分别代表医保数据集和医疗数据集

运行示例

python main.py --upload='tabel1/' --download='tabel2/' --file1='医保_个人基本信息.xlsx' --file2='医保_医保医疗费用结算信息.xlsx' --method='K' --ks= '5,6,7' --target='aka129' --qid='aab001,ake010,akc087,aab020' --type='yb'

运行结果:在'tabel2/'文件夹中得到如下文件

  • 报告.pdf:数据集分析和效用风险评估报告
  • anonymized_5_0_0.0.xlsx:设置k=5运用K-匿名性算法后的文件
  • anonymized_6_0_0.0.xlsx:设置k=6运用K-匿名性算法后的文件
  • anonymized_7_0_0.0.xlsx:设置k=7运用K-匿名性算法后的文件

参考代码

dataguard's People

Contributors

wuyucheng2002 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.