Klasse ARXResult

java.lang.Object
org.deidentifier.arx.ARXResult

public class ARXResult extends Object
Encapsulates the results of an execution of the ARX algorithm.
  • 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

      public ARXConfiguration getConfiguration()
      Returns the configuration used.
      Gibt zurück:
    • getDataDefinition

      public DataDefinition getDataDefinition()
      Returns the data definition
      Gibt zurück:
    • getGlobalOptimum

      public ARXLattice.ARXNode getGlobalOptimum()
      Gets the global optimum.
      Gibt zurück:
      the global optimum
    • getLattice

      public ARXLattice getLattice()
      Returns the lattice.
      Gibt zurück:
    • getInput

      public DataHandle 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

      public DataHandle 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

      public DataHandle getOutput(ARXLattice.ARXNode node)
      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

      public DataHandle getOutput(ARXLattice.ARXNode node, boolean fork)
      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 transformation
      fork - Set this flag to false, only if you know exactly what you are doing.
      Gibt zurück:
    • getOutput

      public DataHandle getOutput(boolean fork)
      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:
      IOException
      ClassNotFoundException
    • getProcessStatistics

      public ARXProcessStatistics getProcessStatistics()
      Returns statistics for the anonymization process
      Gibt zurück:
    • getTime

      public long getTime()
      Returns the execution time (wall clock).
      Gibt zurück:
    • isOptimizable

      public boolean isOptimizable(DataHandle handle)
      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 perform
      adaptionFactor - 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 perform
      adaptionFactor - Is added to the gsFactor when reaching a fixpoint
      listener -
      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

      protected void releaseBuffer(DataHandleOutput handle)
      Releases the buffer.
      Parameter:
      handle -