localSupp2Wrapper(sdcMicro)
localSupp2Wrapper()所属R语言包:sdcMicro
Local Suppression 2
本地抑制2
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A wrapper function for function localSupp2 in order to guarantee k-anonymity.
包装器函数的功能localSupp2在保证k-匿名。
用法----------Usage----------
localSupp2Wrapper(x, keyVars, w, importance=rep(1, length(keyVars)), method="minimizeSupp", kAnon=2)
参数----------Arguments----------
参数:x
data frame or matrix
数据框或矩阵
参数:keyVars
column index of key variables
列索引的关键变量
参数:w
column index of sampling weights
取样权重的指数列
参数:importance
weights for each key variable, see "localSupp2()"
每一个关键变量的权重,请参阅“localSupp2()”
参数:method
“minimizeSupp” (default), further methods will be included in future versions of the package
“minimizeSupp”(默认),进一步的方法将包括在未来版本的软件包
参数:kAnon
parameter for k-anonymity.
K-匿名的参数。
Details
详细信息----------Details----------
This wrapper function guarantees k-anonymity. If function localSupp2() cannot be reach k-anonymity, localSupp2 must be re-run on the previous results as long as k-anoymity is reached. If k-anoymity cannot be achieved (because the entries of parameter importance includes too much zeros) the function breaks after a sub-optimal solution is obtained.
此包装函数保证k-匿名。如果功能localSupp2()不能达到k-匿名,localSupp2必须重新运行,只要达到的K-anoymity是以前的结果。如果k-anoymity无法实现(参数的重要性,因为条目包括太多零)后次优的解决方案的功能场所得到。
值----------Value----------
Object from class localSupp2.
对象类localSupp2。
参数:xAnon
resulting data with suppressions
由此产生的数据与镇压
参数:supps
number of suppressions in the key variables
的镇压中的关键变量
参数:totalSupps
total number of suppressions.
总数的suppressions。
参数:anonymity
TRUE, if k-anonymity is achieved
TRUE,如果K-匿名实现
参数:keyVars
index of the key variables.
指数的关键因素。
参数:importance
weight vector for key variables
关键变量的权重向量
参数:kAnon
k for k-anoymity
k为K-anoymity
注意----------Note----------
fix me: Implementation in C and interface to R.
解决我在C:实施和接口,R.
(作者)----------Author(s)----------
Bernhard Meindl, Matthias Templ
参考文献----------References----------
Statistical Disclosure Control for Microdata Using the R-Package sdcMicro, Transactions on Data Privacy, vol. 1, number 2, pp. 67-85, 2008. http://www.tdp.cat/issues/abs.a004a08.php
参见----------See Also----------
freqCalc, localSupp
freqCalc,localSupp
实例----------Examples----------
## example from Capobianchi, Polettini and Lucarelli:[#例如,从Capobianchi,Polettini和卢卡雷利:]
## same results as localSupp2[#相同的结果localSupp2]
data(francdat)
localSupp2Wrapper(francdat, keyVars=c(2,4,5,6), w=8)
localSupp2Wrapper(francdat, keyVars=c(2,4,5,6), w=8, k=2)
localSupp2Wrapper(francdat, keyVars=c(2,4,5,6), w=8, k=4)
## we want to avoid missings in column 5:[#我们要避免missings在第5列:]
l1 <- localSupp2Wrapper(francdat, keyVars=c(2,4,5,6), importance=c(1,1,0,1), w=8, kAnon=1)
l1$x
## we want to avoid missings in column 5 and allow missings in 1 only if[#要避免missings 1只,如果在第5列,并允许missings的]
## is really necessary:[#是真的有必要:]
l1 <- localSupp2Wrapper(francdat, keyVars=c(2,4,5,6), importance=c(0.1,1,0,1), w=8, kAnon=1)
l1$x
## long computation time, wait some seconds to get an information[#长的计算时间,等待几秒钟,得到的信息]
## about the estimated computing time.[#估计的计算时间。]
## l = localSupp2(free1, keyVars=1:3, w=30, k=2, importance=c(0.1,1,0.8))[#升= localSupp2(FREE1,keyVars = 1:3,瓦特= 30,k = 2时,重要性= C(0.1,1,0.8))]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|