Package org.deidentifier.arx
Klasse ARXConfiguration
java.lang.Object
org.deidentifier.arx.ARXConfiguration
- Alle implementierten Schnittstellen:
Serializable,Cloneable
A generic configuration for the ARX anonymizer.
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic enumThe algorithms supported by ARXstatic classClass for internal use that provides access to more parameters and functionality.static enumMonotonicity.static enumThe semantics of heuristic search steps. -
Feldübersicht
FelderModifizierer und TypFeldBeschreibungstatic final intDo the criteria require a counter per equivalence class.static final intDo the criteria require distributions of sensitive values in the equivalence classes.static final intDo the criteria require a second counter. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungAdds a privacy model to the configuration.clone()Clones this config.static ARXConfigurationcreate()Creates a new configuration without tuple suppression.static ARXConfigurationcreate(double suppressionLimit) Creates a new configuration that allows the given percentage of outliers and thus implements tuple suppression.static ARXConfigurationCreates a new configuration that allows the given percentage of outliers and thus implements tuple suppression.static ARXConfigurationCreates a new configuration that allows to define the metric for measuring information loss.protected intReturns the absolute record suppression limitReturns the anonymization algorithm selecteddoublegetAttributeWeight(String attribute) Returns the weight for the given attribute.Returns all configured attribute weights.Returns the cost/benefit configurationdoubleReturns the privacy budget to use for the data-dependent differential privacy search algorithm.doubleReturns the fraction of individuals crossed overbooleanDeterministic executiondoubleReturns the size of the elite groupdoubleReturns the fraction to immigrateintReturns the immigration intervalintReturns the genetic algorithm iterationsdoubleReturns the mutation probabilitydoubleReturns the production fractionintReturns the size of the sub-populationintgetHeuristicSearchStepLimit(ARXConfiguration.SearchStepSemantics requestedSearchStepSemantics, int numQIs) The heuristic search algorithm will terminate after the returned number of steps.intWhen the size of the solution space exceeds the returned number of transformations, ARX will use a heuristic search strategy.intThe heuristic search algorithm will terminate after the returned number of milliseconds.protected ARXConfigurationgetInstanceForLocalRecoding(RowSet rowset, double gsFactor) Clones this config and projects everything onto the given subset.
- All privacy models will be cloned
- Subsets in d-presence will be projected accordingly
- Utility measures will be cloned
- Replaces estimated k-map with according k-anonymityReturns an internal variant of the class which provides a broader interfacedoubleVeraltet.protected intReturns the minimal size of an equivalence class induced by the defined privacy models.Returns whether the privacy model is monotonicReturns whether the utility measure is monotonicprotected intReturns the number of output records that will be produced, zero if this information is not available<T extends PrivacyCriterion>
TgetPrivacyModel(Class<T> clazz) Returns an instance of the class, if any.Returns all privacy models.<T extends PrivacyCriterion>
Set<T> getPrivacyModels(Class<T> clazz) Returns all privacy models which are instances of the given class.protected PrivacyCriterion[]Returns all criteria (except k-anonymity) as an array.Metric<?> Returns the quality model to be used for optimizing output data.protected intReturns the criteria's requirements.doubleReturn journalist risk threshold, 1 if there is nonedoubleReturn marketer risk threshold, 1 if there is nonedoubleReturn prosecutor risk threshold, 1 if there is noneprotected SampleBasedCriterion[]Returns all sample-based criteria as an array.protected intReturns the specific length of each entry in a snapshot.protected DataSubsetReturns the data subset, if any subset is defined.protected intReturns an integer representing all attribute types that must be suppressed.doubleReturns the suppression limitprotected voidinitialize(DataManager manager) Initializes the configuration.booleanReturns whether values of the given attribute type will be replaced by the suppression string in suppressed tuples.booleanIs practical monotonicity assumed.booleanisPrivacyModelSpecified(Class<? extends PrivacyCriterion> clazz) Returns whether the configuration contains a privacy model which is an instance of the given class.booleanReturns whether suppression is applied to the output of anonymous as well as non-anonymous transformations.booleanIs optimality guaranteed for sample-based criteria?<T extends PrivacyCriterion>
booleanRemoves the given criterion.render()Renders this objectprotected booleanrequires(int requirement) Convenience method for checking the requirements.voidSets the algorithm to usevoidsetAttributeTypeSuppressed(AttributeType type, boolean enabled) Defines values of which attribute type are to be replaced by the suppression string in suppressed tuples.voidsetAttributeWeight(String attribute, double weight) Sets the weight for the given attribute.voidsetAttributeWeight(String attribute, Double weight) Sets the weight for the given attribute.Sets the cost/benefit configurationvoidsetDPSearchBudget(double budget) Sets the privacy budget to use for the data-dependent differential privacy search algorithm.voidsetGeneticAlgorithmCrossoverFraction(double geneticAlgorithmCrossoverFraction) Sets the fraction of individuals crossed overvoidsetGeneticAlgorithmDeterministic(boolean geneticAlgorithmDeterministic) Deterministic executionvoidsetGeneticAlgorithmEliteFraction(double geneticAlgorithmEliteFraction) Sets the size of the elite groupvoidsetGeneticAlgorithmImmigrationFraction(double geneticAlgorithmImmigrationFraction) Sets the fraction to immigratevoidsetGeneticAlgorithmImmigrationInterval(int geneticAlgorithmImmigrationInterval) Sets the immigration intervalvoidsetGeneticAlgorithmIterations(int geneticAlgorithmIterations) Sets the genetic algorithm iterationsvoidsetGeneticAlgorithmMutationProbability(double geneticAlgorithmMutationProbability) Sets the mutation probabilityvoidsetGeneticAlgorithmProductionFraction(double geneticAlgorithmProductionFraction) Sets the production fractionvoidsetGeneticAlgorithmSubpopulationSize(int geneticAlgorithmSubpopulationSize) SettervoidsetHeuristicSearchStepLimit(int numberOfTransformations) The heuristic search algorithm will terminate after the given number of transformations have been checked.voidsetHeuristicSearchStepLimit(int numberOfTransformations, ARXConfiguration.SearchStepSemantics searchStepSemantics) Sets the semantics of heuristic search steps.voidsetHeuristicSearchThreshold(int numberOfTransformations) When the size of the solution space exceeds the given number of transformations, ARX will use a heuristic search strategy.voidsetHeuristicSearchTimeLimit(int timeInMillis) The heuristic search algorithm will terminate after the given number of milliseconds.voidsetMaxOutliers(double max) Veraltet.voidsetPracticalMonotonicity(boolean assumeMonotonicity) Set, if practical monotonicity assumed.voidsetQualityModel(Metric<?> model) Sets the quality model to be used for optimizing output data.voidsetSuppressionAlwaysEnabled(boolean enabled) Sets whether suppression is applied to the output of anonymous as well as non-anonymous transformations.voidsetSuppressionLimit(double limit) Sets the suppression limit.voidsetUseHeuristicSearchForSampleBasedCriteria(boolean value) Do we guarantee optimality for sample-based criteria?
-
Felddetails
-
REQUIREMENT_COUNTER
public static final int REQUIREMENT_COUNTERDo the criteria require a counter per equivalence class.- Siehe auch:
-
REQUIREMENT_DISTRIBUTION
public static final int REQUIREMENT_DISTRIBUTIONDo the criteria require distributions of sensitive values in the equivalence classes.- Siehe auch:
-
REQUIREMENT_SECONDARY_COUNTER
public static final int REQUIREMENT_SECONDARY_COUNTERDo the criteria require a second counter.- Siehe auch:
-
-
Methodendetails
-
create
Creates a new configuration without tuple suppression.- Gibt zurück:
-
create
Creates a new configuration that allows the given percentage of outliers and thus implements tuple suppression.- Parameter:
suppressionLimit-- Gibt zurück:
-
create
Creates a new configuration that allows the given percentage of outliers and thus implements tuple suppression. Defines the metric for measuring information loss.- Parameter:
suppressionLimit-metric-- Gibt zurück:
-
create
Creates a new configuration that allows to define the metric for measuring information loss.- Parameter:
metric-- Gibt zurück:
-
addPrivacyModel
Adds a privacy model to the configuration.- Parameter:
c-- Gibt zurück:
-
clone
Clones this config. -
getAlgorithm
Returns the anonymization algorithm selected- Gibt zurück:
-
getAttributeWeight
Returns the weight for the given attribute.- Parameter:
attribute-- Gibt zurück:
-
getAttributeWeights
Returns all configured attribute weights. For attributes which are not a key in this set the default attribute weight will be assumed by ARX. This default value is currently set to 0.5.- Gibt zurück:
-
getCostBenefitConfiguration
Returns the cost/benefit configuration -
getDPSearchBudget
public double getDPSearchBudget()Returns the privacy budget to use for the data-dependent differential privacy search algorithm. The default is 0.1.- Gibt zurück:
-
getGeneticAlgorithmCrossoverFraction
public double getGeneticAlgorithmCrossoverFraction()Returns the fraction of individuals crossed over- Gibt zurück:
-
getGeneticAlgorithmDeterministic
public boolean getGeneticAlgorithmDeterministic()Deterministic execution- Gibt zurück:
-
getGeneticAlgorithmEliteFraction
public double getGeneticAlgorithmEliteFraction()Returns the size of the elite group- Gibt zurück:
-
getGeneticAlgorithmImmigrationFraction
public double getGeneticAlgorithmImmigrationFraction()Returns the fraction to immigrate- Gibt zurück:
-
getGeneticAlgorithmImmigrationInterval
public int getGeneticAlgorithmImmigrationInterval()Returns the immigration interval- Gibt zurück:
-
getGeneticAlgorithmIterations
public int getGeneticAlgorithmIterations()Returns the genetic algorithm iterations- Gibt zurück:
-
getGeneticAlgorithmMutationProbability
public double getGeneticAlgorithmMutationProbability()Returns the mutation probability- Gibt zurück:
-
getGeneticAlgorithmProductionFraction
public double getGeneticAlgorithmProductionFraction()Returns the production fraction- Gibt zurück:
-
getGeneticAlgorithmSubpopulationSize
public int getGeneticAlgorithmSubpopulationSize()Returns the size of the sub-population- Gibt zurück:
-
getHeuristicSearchStepLimit
public int getHeuristicSearchStepLimit(ARXConfiguration.SearchStepSemantics requestedSearchStepSemantics, int numQIs) The heuristic search algorithm will terminate after the returned number of steps. The default isInteger.MAX_VALUE, i.e. no limit.- Parameter:
requestedSearchStepSemantics- the semantics of the number of search steps to be returnednumQIs- the number of QIs- Gibt zurück:
-
getHeuristicSearchThreshold
public int getHeuristicSearchThreshold()When the size of the solution space exceeds the returned number of transformations, ARX will use a heuristic search strategy. The default is 100.000.- Gibt zurück:
-
getHeuristicSearchTimeLimit
public int getHeuristicSearchTimeLimit()The heuristic search algorithm will terminate after the returned number of milliseconds. The default is 30 seconds.- Gibt zurück:
-
getMaxOutliers
Veraltet.Returns the maximum number of allowed outliers. Deprecated. UsegetSuppressionLimit()instead.- Gibt zurück:
-
getMonotonicityOfPrivacy
Returns whether the privacy model is monotonic- Gibt zurück:
-
getMonotonicityOfUtility
Returns whether the utility measure is monotonic- Gibt zurück:
-
getPrivacyModel
Returns an instance of the class, if any. Throws an exception if more than one such model exists.- Typparameter:
T-- Parameter:
clazz-- Gibt zurück:
-
getPrivacyModels
Returns all privacy models.- Gibt zurück:
-
getPrivacyModels
Returns all privacy models which are instances of the given class.- Typparameter:
T-- Parameter:
clazz-- Gibt zurück:
-
getQualityModel
Returns the quality model to be used for optimizing output data.- Gibt zurück:
-
getRiskThresholdJournalist
public double getRiskThresholdJournalist()Return journalist risk threshold, 1 if there is none- Gibt zurück:
-
getRiskThresholdMarketer
public double getRiskThresholdMarketer()Return marketer risk threshold, 1 if there is none- Gibt zurück:
-
getRiskThresholdProsecutor
public double getRiskThresholdProsecutor()Return prosecutor risk threshold, 1 if there is none- Gibt zurück:
-
getSuppressionLimit
public double getSuppressionLimit()Returns the suppression limit- Gibt zurück:
-
isAttributeTypeSuppressed
Returns whether values of the given attribute type will be replaced by the suppression string in suppressed tuples.- Parameter:
type-- Gibt zurück:
-
isPracticalMonotonicity
public boolean isPracticalMonotonicity()Is practical monotonicity assumed.- Gibt zurück:
-
isPrivacyModelSpecified
Returns whether the configuration contains a privacy model which is an instance of the given class.- Parameter:
clazz-- Gibt zurück:
-
isSuppressionAlwaysEnabled
public boolean isSuppressionAlwaysEnabled()Returns whether suppression is applied to the output of anonymous as well as non-anonymous transformations. If this flag is set totrue, suppression will be applied to the output of non-anonymous transformations to make them anonymous (if possible). Default istrue.- Gibt zurück:
-
isUseHeuristicSearchForSampleBasedCriteria
public boolean isUseHeuristicSearchForSampleBasedCriteria()Is optimality guaranteed for sample-based criteria? -
removeCriterion
Removes the given criterion.- Typparameter:
T-- Parameter:
arg-- Gibt zurück:
-
render
Renders this object- Gibt zurück:
-
setAlgorithm
Sets the algorithm to use- Parameter:
algorithm-
-
setAttributeTypeSuppressed
Defines values of which attribute type are to be replaced by the suppression string in suppressed tuples. With default settings, only quasi-identifiers will be suppressed.- Parameter:
type- the attribute typeenabled- whether suppression should be performed or not
-
setAttributeWeight
Sets the weight for the given attribute.- Parameter:
attribute-weight-
-
setAttributeWeight
Sets the weight for the given attribute.- Parameter:
attribute-weight-
-
setCostBenefitConfiguration
Sets the cost/benefit configuration- Parameter:
config-
-
setDPSearchBudget
public void setDPSearchBudget(double budget) Sets the privacy budget to use for the data-dependent differential privacy search algorithm. The default is 0.1.- Parameter:
budget-
-
setGeneticAlgorithmCrossoverFraction
public void setGeneticAlgorithmCrossoverFraction(double geneticAlgorithmCrossoverFraction) Sets the fraction of individuals crossed over- Parameter:
geneticAlgorithmCrossoverPercent-
-
setGeneticAlgorithmDeterministic
public void setGeneticAlgorithmDeterministic(boolean geneticAlgorithmDeterministic) Deterministic execution- Parameter:
geneticAlgorithmDeterministic-
-
setGeneticAlgorithmEliteFraction
public void setGeneticAlgorithmEliteFraction(double geneticAlgorithmEliteFraction) Sets the size of the elite group- Parameter:
geneticAlgorithmElitePercent-
-
setGeneticAlgorithmImmigrationFraction
public void setGeneticAlgorithmImmigrationFraction(double geneticAlgorithmImmigrationFraction) Sets the fraction to immigrate- Parameter:
geneticAlgorithmImmigrationFraction-
-
setGeneticAlgorithmImmigrationInterval
public void setGeneticAlgorithmImmigrationInterval(int geneticAlgorithmImmigrationInterval) Sets the immigration interval- Parameter:
geneticAlgorithmImmigrationInterval-
-
setGeneticAlgorithmIterations
public void setGeneticAlgorithmIterations(int geneticAlgorithmIterations) Sets the genetic algorithm iterations- Parameter:
geneticAlgorithmIterations-
-
setGeneticAlgorithmMutationProbability
public void setGeneticAlgorithmMutationProbability(double geneticAlgorithmMutationProbability) Sets the mutation probability- Parameter:
geneticAlgorithmMutationProbability-
-
setGeneticAlgorithmProductionFraction
public void setGeneticAlgorithmProductionFraction(double geneticAlgorithmProductionFraction) Sets the production fraction- Parameter:
geneticAlgorithmImmigrationInterval-
-
setGeneticAlgorithmSubpopulationSize
public void setGeneticAlgorithmSubpopulationSize(int geneticAlgorithmSubpopulationSize) Setter- Parameter:
geneticAlgorithmSubpopulationSize-
-
setHeuristicSearchStepLimit
public void setHeuristicSearchStepLimit(int numberOfTransformations) The heuristic search algorithm will terminate after the given number of transformations have been checked. The default isInteger.MAX_VALUE, i.e. no limit. ARX supports different search step semantics. The standards semantics (implemented by this method) is that this parameter restricts the number of transformations from the solution space that are searched during anonymization.- Parameter:
numberOfTransformations-
-
setHeuristicSearchStepLimit
public void setHeuristicSearchStepLimit(int numberOfTransformations, ARXConfiguration.SearchStepSemantics searchStepSemantics) Sets the semantics of heuristic search steps. If the semanticEXPANSIONSis set, then the limit of the number of heuristic checks will be calculated by multiplying the heuristic search step limit with the number of QIs.- Parameter:
searchStepSemantics-
-
setHeuristicSearchThreshold
public void setHeuristicSearchThreshold(int numberOfTransformations) When the size of the solution space exceeds the given number of transformations, ARX will use a heuristic search strategy. The default is 100.000.- Parameter:
numberOfTransformations-
-
setHeuristicSearchTimeLimit
public void setHeuristicSearchTimeLimit(int timeInMillis) The heuristic search algorithm will terminate after the given number of milliseconds. The default is 30 seconds.- Parameter:
timeInMillis-
-
setMaxOutliers
Veraltet.Allows for a certain percentage of outliers and thus triggers tuple suppression. Deprecated. UsesetSuppressionLimit()instead.- Parameter:
max-
-
setPracticalMonotonicity
public void setPracticalMonotonicity(boolean assumeMonotonicity) Set, if practical monotonicity assumed.- Parameter:
assumeMonotonicity-
-
setQualityModel
Sets the quality model to be used for optimizing output data.- Parameter:
model-
-
setSuppressionAlwaysEnabled
public void setSuppressionAlwaysEnabled(boolean enabled) Sets whether suppression is applied to the output of anonymous as well as non-anonymous transformations. If this flag is set totrue, suppression will be applied to the output of non-anonymous transformations to make them anonymous (if possible). Default istrue.- Parameter:
enabled-
-
setSuppressionLimit
public void setSuppressionLimit(double limit) Sets the suppression limit. This is an alias for setMaxOutliers().- Parameter:
limit-
-
setUseHeuristicSearchForSampleBasedCriteria
public void setUseHeuristicSearchForSampleBasedCriteria(boolean value) Do we guarantee optimality for sample-based criteria? -
getAbsoluteSuppressionLimit
protected int getAbsoluteSuppressionLimit()Returns the absolute record suppression limit- Gibt zurück:
-
getInstanceForLocalRecoding
Clones this config and projects everything onto the given subset.
- All privacy models will be cloned
- Subsets in d-presence will be projected accordingly
- Utility measures will be cloned
- Replaces estimated k-map with according k-anonymity- Parameter:
rowset-gsFactor- May be NaN if it should be ignored- Gibt zurück:
-
getInternalConfiguration
Returns an internal variant of the class which provides a broader interface- Gibt zurück:
-
getMinimalGroupSize
protected int getMinimalGroupSize()Returns the minimal size of an equivalence class induced by the defined privacy models.- Gibt zurück:
- If k-anonymity is contained, k is returned. If l-diversity is contained, l is returned. If both are contained max(k,l) is returned. Otherwise, Integer.MAX_VALUE is returned.
-
getNumOutputRecords
protected int getNumOutputRecords()Returns the number of output records that will be produced, zero if this information is not available- Gibt zurück:
-
getPrivacyModelsAsArray
Returns all criteria (except k-anonymity) as an array. Only used internally. If k-anonymity is included the minimal group size should be obtained and enforced- Gibt zurück:
-
getRequirements
protected int getRequirements()Returns the criteria's requirements.- Gibt zurück:
-
getSampleBasedPrivacyModelsAsArray
Returns all sample-based criteria as an array. Only used internally.- Gibt zurück:
-
getSnapshotLength
protected int getSnapshotLength()Returns the specific length of each entry in a snapshot.- Gibt zurück:
-
getSubset
Returns the data subset, if any subset is defined. You may only call this, after the configuration has be initialized.- Gibt zurück:
-
getSuppressedAttributeTypes
protected int getSuppressedAttributeTypes()Returns an integer representing all attribute types that must be suppressed.- Gibt zurück:
-
initialize
Initializes the configuration.- Parameter:
manager-
-
requires
protected boolean requires(int requirement) Convenience method for checking the requirements.- Parameter:
requirement-- Gibt zurück:
-