本文整理汇总了Java中org.deidentifier.arx.risk.RiskModelPopulationUniqueness.PopulationUniquenessModel.DANKAR属性的典型用法代码示例。如果您正苦于以下问题:Java PopulationUniquenessModel.DANKAR属性的具体用法?Java PopulationUniquenessModel.DANKAR怎么用?Java PopulationUniquenessModel.DANKAR使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.deidentifier.arx.risk.RiskModelPopulationUniqueness.PopulationUniquenessModel
的用法示例。
在下文中一共展示了PopulationUniquenessModel.DANKAR属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isFulfilled
/**
* We currently assume that at any time, at least one statistical model converges.
* This might not be the case, and 0 may be returned instead. That's why we only
* accept estimates of 0, if the number of equivalence classes of size 1 in the sample is also zero
*
* @param distribution
* @return
*/
protected boolean isFulfilled(HashGroupifyDistribution distribution) {
RiskModelPopulationUniqueness riskModel = new RiskModelPopulationUniqueness(this.populationModel,
distribution.getHistogram(),
solverConfig);
double populationUniques = 0d;
if (this.statisticalModel == PopulationUniquenessModel.DANKAR) {
populationUniques = riskModel.getFractionOfUniqueTuplesDankar(false);
} else {
populationUniques = riskModel.getFractionOfUniqueTuples(this.statisticalModel);
}
if (populationUniques > 0d && populationUniques <= getRiskThreshold()) {
return true;
} else if (populationUniques == 0d && distribution.getFractionOfRecordsInClassesOfSize(1) == 0d) {
return true;
} else {
return false;
}
}
示例2: getPopulationUniquessModel
/**
* Gets the PopulationUniqueness Model out of the Index
* @param x The Index
* @return The Population Uniqueness Model
*/
private PopulationUniquenessModel getPopulationUniquessModel(int x) {
switch (x) {
case 0:
return PopulationUniquenessModel.DANKAR;
case 1:
return PopulationUniquenessModel.PITMAN;
case 2:
return PopulationUniquenessModel.ZAYATZ;
default:
return PopulationUniquenessModel.SNB;
}
}
示例3: PopulationUniqueness
/**
* Creates a new instance of this criterion. Uses Dankar's method for estimating population uniqueness.
* This constructor will clone the population model, making further changes to it will not influence
* the results. The default accuracy is 10e-6 and the default maximal number of iterations is 1000.
*
* @param riskThreshold
* @param populationModel
*/
public PopulationUniqueness(double riskThreshold, ARXPopulationModel populationModel){
this(riskThreshold, PopulationUniquenessModel.DANKAR, populationModel);
}