Klasse QualityModelColumnOrientedPrecision

java.lang.Object
org.deidentifier.arx.aggregates.quality.QualityModelColumnOrientedPrecision

public class QualityModelColumnOrientedPrecision extends Object
Implementation of the Precision measure, as proposed in:

L. Sweeney: "Achieving k-anonymity privacy protection using generalization and suppression" J Uncertain Fuzz Knowl Sys 10 (5) (2002) 571-588.
  • Konstruktordetails

  • Methodendetails

    • evaluate

      public QualityMeasureColumnOriented evaluate()
      Evaluates the utility measure
      Gibt zurück:
    • checkInterrupt

      protected void checkInterrupt()
      Checks whether an interruption happened.
    • getColumnsAsNumbers

      protected double[][] getColumnsAsNumbers(DataHandle input, DataHandle output, String[][] hierarchy, int column)
      Returns a columns from the input and output dataset converted to numbers
      Parameter:
      input -
      output -
      hierarchy -
      column -
      Gibt zurück:
    • getDomainShares

      protected QualityDomainShare[] getDomainShares()
      Returns the domain shares
    • getGroupedInput

      protected Groupify<TupleWrapper> getGroupedInput()
      Returns grouped input
    • getGroupedOutput

      protected Groupify<TupleWrapper> getGroupedOutput()
      Returns grouped output
    • getHierarchies

      protected String[][][] getHierarchies()
      Returns the hierarchies
    • getIndices

      protected int[] getIndices()
      Returns relevant indices
    • getInput

      protected DataHandle getInput()
      Returns input
      Gibt zurück:
    • getMinMax

      protected double[] getMinMax(double[] column)
      Returns minimum, maximum for the given column
      Parameter:
      column -
      Gibt zurück:
    • getNumbersFromHierarchy

      protected double[] getNumbersFromHierarchy(DataHandle handle, int column, String[][] hierarchy)
      Returns a numeric representation, relying on the hierarchy
      Parameter:
      handle -
      column -
      hierarchy -
      Gibt zurück:
    • getNumbersFromNumericColumn

      protected double[] getNumbersFromNumericColumn(DataHandle input, int column)
      Parses numbers from a numeric input column
      Parameter:
      input -
      column -
      Gibt zurück:
    • getNumbersFromNumericColumn

      protected double[] getNumbersFromNumericColumn(double[] inputAsNumbers, DataHandle output, int column)
      Parses numbers from a numeric output column
      Parameter:
      inputAsNumbers -
      output -
      column -
      Gibt zurück:
    • getNumbersFromNumericColumnAndHierarchy

      protected double[] getNumbersFromNumericColumnAndHierarchy(DataHandle input, double[] inputAsNumbers, DataHandle output, int column, String[][] hierarchy)
      Uses numeric input and a hierarchy to construct ranges
      Parameter:
      input -
      inputAsNumbers -
      output -
      column -
      hierarchy -
      Gibt zurück:
    • getOutput

      protected DataHandle getOutput()
      Returns output
      Gibt zurück:
    • getRangeFromNumericColumn

      protected double[] getRangeFromNumericColumn(double[] inputNumbers, DataHandle output, int column)
      Tries to parse numbers from output when there is a numeric input column
      Parameter:
      inputNumbers -
      output -
      column -
      Gibt zurück:
    • getSuppressedRecordsInInput

      protected int getSuppressedRecordsInInput()
      Returns the number of records suppressed in input
      Gibt zurück:
    • getSuppressedRecordsInOutput

      protected int getSuppressedRecordsInOutput()
      Returns the number of records suppressed in output
      Gibt zurück:
    • getSuppressionString

      protected String getSuppressionString()
      Returns the suppression string
      Gibt zurück:
    • isSuppressed

      protected boolean isSuppressed(DataHandle handle, int row, int column)
      Returns whether a value is suppressed
      Parameter:
      handle -
      row -
      column -
      Gibt zurück:
    • isSuppressed

      protected boolean isSuppressed(DataHandle handle, int[] indices, int row)
      We assume that an entry is suppressed, if all values are equal
      Parameter:
      entry -
      Gibt zurück:
    • isSuppressed

      protected boolean isSuppressed(int column, String value)
      Returns whether a value is suppressed
      Parameter:
      column -
      value -
      Gibt zurück:
    • log2

      protected double log2(double d)
      Log base-2
      Parameter:
      d -
      Gibt zurück:
    • setStepPerformed

      protected void setStepPerformed()
      One step performed
    • setSteps

      protected void setSteps(int steps)
      Total number of steps
      Parameter:
      steps -
    • setStepsDone

      protected void setStepsDone()
      All steps performed