Package org.deidentifier.arx
Klasse ARXResult
java.lang.Object
org.deidentifier.arx.ARXResult
Encapsulates the results of an execution of the ARX algorithm.
-
Konstruktorübersicht
KonstruktorenModifiziererKonstruktorBeschreibungprotectedARXResult(ARXAnonymizer anonymizer, org.deidentifier.arx.DataRegistry registry, org.deidentifier.arx.framework.data.DataManager manager, org.deidentifier.arx.framework.check.TransformationChecker checker, DataDefinition definition, ARXConfiguration config, ARXLattice lattice, long duration, org.deidentifier.arx.framework.lattice.SolutionSpace<?> solutionSpace, boolean optimumFound) Creates a new instance.ARXResult(DataHandle handle, DataDefinition definition, ARXLattice lattice, int historySize, double snapshotSizeSnapshot, double snapshotSizeDataset, Metric<?> metric, ARXConfiguration config, ARXLattice.ARXNode optimum, long time, org.deidentifier.arx.framework.lattice.SolutionSpace<?> solutionSpace, ARXProcessStatistics statistics) Internal constructor for deserialization. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the configuration used.Returns the data definitionGets the global optimum.getInput()Returns the associated input handleReturns the lattice.booleanReturns whether the global optimum has been foundReturns a handle to the data obtained by applying the optimal transformation.getOutput(boolean fork) Returns a handle to the data obtained by applying the optimal transformation.getOutput(InputStream stream, ARXLattice.ARXNode transformation) Internal method, not for external usegetOutput(ARXLattice.ARXNode node) Returns a handle to data obtained by applying the given transformation.getOutput(ARXLattice.ARXNode node, boolean fork) Returns a handle to data obtained by applying the given transformation.Returns statistics for the anonymization processlonggetTime()Returns the execution time (wall clock).booleanisOptimizable(DataHandle handle) Returns whether local recoding can be applied to the given handlebooleanIndicates if a result is available.optimize(DataHandle handle) This method optimizes the given data output with local recoding to improve its utilityoptimize(DataHandle handle, double gsFactor) This method optimizes the given data output with local recoding to improve its utilityoptimize(DataHandle handle, double gsFactor, ARXListener listener) This method optimizes the given data output with local recoding to improve its utilityoptimizeFast(DataHandle handle, double records) This method optimizes the given data output with local recoding to improve its utilityoptimizeFast(DataHandle handle, double records, double gsFactor, ARXListener listener) This method optimizes the given data output with local recoding to improve its utilityoptimizeFast(DataHandle handle, double records, ARXListener listener) This method optimizes the given data output with local recoding to improve its utilityoptimizeIterative(DataHandle handle, double gsFactor, int maxIterations, double adaptionFactor) This method optimizes the given data output with local recoding to improve its utilityoptimizeIterative(DataHandle handle, double gsFactor, int maxIterations, double adaptionFactor, ARXListener listener) This method optimizes the given data output with local recoding to improve its utilityoptimizeIterativeFast(DataHandle handle, double records) This method optimizes the given data output with local recoding to improve its utilityoptimizeIterativeFast(DataHandle handle, double records, double gsFactor, ARXListener listener) This method optimizes the given data output with local recoding to improve its utilityoptimizeIterativeFast(DataHandle handle, double records, ARXListener listener) This method optimizes the given data output with local recoding to improve its utilityprotected voidreleaseBuffer(DataHandleOutput handle) Releases the buffer.
-
Konstruktordetails
-
ARXResult
public ARXResult(DataHandle handle, DataDefinition definition, ARXLattice lattice, int historySize, double snapshotSizeSnapshot, double snapshotSizeDataset, Metric<?> metric, ARXConfiguration config, ARXLattice.ARXNode optimum, long time, org.deidentifier.arx.framework.lattice.SolutionSpace<?> solutionSpace, ARXProcessStatistics statistics) Internal constructor for deserialization.- Parameter:
handle-definition-lattice-historySize-snapshotSizeSnapshot-snapshotSizeDataset-metric-config-optimum-solutionSpace-statistics-
-
ARXResult
protected ARXResult(ARXAnonymizer anonymizer, org.deidentifier.arx.DataRegistry registry, org.deidentifier.arx.framework.data.DataManager manager, org.deidentifier.arx.framework.check.TransformationChecker checker, DataDefinition definition, ARXConfiguration config, ARXLattice lattice, long duration, org.deidentifier.arx.framework.lattice.SolutionSpace<?> solutionSpace, boolean optimumFound) Creates a new instance.- Parameter:
anonymizer-registry-manager-checker-definition-config-lattice-duration-solutionSpace-optimumFound-
-
-
Methodendetails
-
getConfiguration
Returns the configuration used.- Gibt zurück:
-
getDataDefinition
Returns the data definition- Gibt zurück:
-
getGlobalOptimum
Gets the global optimum.- Gibt zurück:
- the global optimum
-
getLattice
Returns the lattice.- Gibt zurück:
-
getInput
Returns the associated input handle- Gibt zurück:
-
getOptimumFound
public boolean getOptimumFound()Returns whether the global optimum has been found- Gibt zurück:
-
getOutput
Returns a handle to the data obtained by applying the optimal transformation. This method will fork the buffer, allowing to obtain multiple handles to different representations of the data set. Note that only one instance can be obtained for each transformation.- Gibt zurück:
-
getOutput
Returns a handle to data obtained by applying the given transformation. This method will fork the buffer, allowing to obtain multiple handles to different representations of the data set. Note that only one instance can be obtained for each transformation.- Parameter:
node- the transformation- Gibt zurück:
-
getOutput
Returns a handle to data obtained by applying the given transformation. This method allows controlling whether the underlying buffer is copied or not. Setting the flag to true will fork the buffer for every handle, allowing to obtain multiple handles to different representations of the data set. When setting the flag to false, all previous handles for output data will be invalidated when a new handle is obtained.- Parameter:
node- the transformationfork- Set this flag to false, only if you know exactly what you are doing.- Gibt zurück:
-
getOutput
Returns a handle to the data obtained by applying the optimal transformation. This method allows controlling whether the underlying buffer is copied or not. Setting the flag to true will fork the buffer for every handle, allowing to obtain multiple handles to different representations of the data set. When setting the flag to false, all previous handles for output data will be invalidated when a new handle is obtained.- Parameter:
fork- Set this flag to false, only if you know exactly what you are doing.- Gibt zurück:
-
getOutput
public DataHandle getOutput(InputStream stream, ARXLattice.ARXNode transformation) throws ClassNotFoundException, IOException Internal method, not for external use- Parameter:
stream-transformation-- Gibt zurück:
- Löst aus:
IOExceptionClassNotFoundException
-
getProcessStatistics
Returns statistics for the anonymization process- Gibt zurück:
-
getTime
public long getTime()Returns the execution time (wall clock).- Gibt zurück:
-
isOptimizable
Returns whether local recoding can be applied to the given handle- Parameter:
handle-- Gibt zurück:
-
isResultAvailable
public boolean isResultAvailable()Indicates if a result is available.- Gibt zurück:
-
optimize
This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-- Gibt zurück:
- The number of optimized records
- Löst aus:
RollbackRequiredException
-
optimize
public ARXProcessStatistics optimize(DataHandle handle, double gsFactor) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-gsFactor- A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.- Gibt zurück:
- The number of optimized records
- Löst aus:
RollbackRequiredException
-
optimize
public ARXProcessStatistics optimize(DataHandle handle, double gsFactor, ARXListener listener) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-gsFactor- A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.listener-- Gibt zurück:
- The number of optimized records
- Löst aus:
RollbackRequiredException
-
optimizeFast
public ARXProcessStatistics optimizeFast(DataHandle handle, double records) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-records- A fraction [0,1] of records that need to be optimized.- Gibt zurück:
- The number of optimized records
- Löst aus:
RollbackRequiredException
-
optimizeFast
public ARXProcessStatistics optimizeFast(DataHandle handle, double records, ARXListener listener) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-records- A fraction [0,1] of records that need to be optimized.listener-- Gibt zurück:
- The number of optimized records
- Löst aus:
RollbackRequiredException
-
optimizeFast
public ARXProcessStatistics optimizeFast(DataHandle handle, double records, double gsFactor, ARXListener listener) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-records- A fraction [0,1] of records that need to be optimized.gsFactor- A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.listener-- Gibt zurück:
- The number of optimized records
- Löst aus:
RollbackRequiredException
-
optimizeIterative
public ARXProcessStatistics optimizeIterative(DataHandle handle, double gsFactor, int maxIterations, double adaptionFactor) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-gsFactor- A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.maxIterations- The maximal number of iterations to performadaptionFactor- Is added to the gsFactor when reaching a fixpoint- Löst aus:
RollbackRequiredException
-
optimizeIterative
public ARXProcessStatistics optimizeIterative(DataHandle handle, double gsFactor, int maxIterations, double adaptionFactor, ARXListener listener) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-gsFactor- A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.maxIterations- The maximal number of iterations to performadaptionFactor- Is added to the gsFactor when reaching a fixpointlistener-- Löst aus:
RollbackRequiredException
-
optimizeIterativeFast
public ARXProcessStatistics optimizeIterativeFast(DataHandle handle, double records) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-records- A fraction [0,1] of records that need to be optimized in each step.- Löst aus:
RollbackRequiredException
-
optimizeIterativeFast
public ARXProcessStatistics optimizeIterativeFast(DataHandle handle, double records, ARXListener listener) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-records- A fraction [0,1] of records that need to be optimized in each step.listener-- Löst aus:
RollbackRequiredException
-
optimizeIterativeFast
public ARXProcessStatistics optimizeIterativeFast(DataHandle handle, double records, double gsFactor, ARXListener listener) throws RollbackRequiredException This method optimizes the given data output with local recoding to improve its utility- Parameter:
handle-records- A fraction [0,1] of records that need to be optimized in each step.gsFactor- A factor [0,1] weighting generalization and suppression. The default value is 0.5, which means that generalization and suppression will be treated equally. A factor of 0 will favor suppression, and a factor of 1 will favor generalization. The values in between can be used for balancing both methods.listener-- Löst aus:
RollbackRequiredException
-
releaseBuffer
Releases the buffer.- Parameter:
handle-
-