Klasse Metric<T extends InformationLoss<?>>

java.lang.Object
org.deidentifier.arx.metric.Metric<T>
Typparameter:
T -
Alle implementierten Schnittstellen:
Serializable
Bekannte direkte Unterklassen:
AbstractMetricMultiDimensional, AbstractMetricSingleDimensional, MetricDefault, MetricWeighted

public abstract class Metric<T extends InformationLoss<?>> extends Object implements Serializable
Abstract base class for metrics.
Siehe auch:
  • Konstruktordetails

    • Metric

      protected Metric(boolean monotonicWithGeneralization, boolean monotonicWithSuppression, boolean independent, double gsFactor)
      Create a new metric.
      Parameter:
      monotonicWithGeneralization -
      monotonicWithSuppression -
      independent -
      gsFactor -
  • Methodendetails

    • createAECSMetric

      public static Metric<ILSingleDimensional> createAECSMetric()
      Creates a new instance of the AECS metric.
      Gibt zurück:
    • createAECSMetric

      public static Metric<ILSingleDimensional> createAECSMetric(double gsFactor)
      Creates a new instance of the AECS metric.
      Parameter:
      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:
    • createAmbiguityMetric

      public static Metric<ILSingleDimensional> createAmbiguityMetric()
      Creates an instance of the ambiguity metric.
      Gibt zurück:
    • createClassificationMetric

      public static Metric<ILSingleDimensional> createClassificationMetric()
      Creates an instance of the classification metric.
      Gibt zurück:
    • createClassificationMetric

      public static Metric<ILSingleDimensional> createClassificationMetric(double gsFactor)
      Creates an instance of the classification metric.
      Parameter:
      gsFactor -
      Gibt zurück:
    • createDiscernabilityMetric

      public static Metric<ILSingleDimensional> createDiscernabilityMetric()
      Creates an instance of the discernability metric.
      Gibt zurück:
    • createDiscernabilityMetric

      public static Metric<ILSingleDimensional> createDiscernabilityMetric(boolean monotonic)
      Creates an instance of the discernability metric. The monotonic variant is DM*.
      Parameter:
      monotonic - If set to true, the monotonic variant (DM*) will be created
      Gibt zurück:
    • createEntropyBasedInformationLossMetric

      public static MetricSDNMEntropyBasedInformationLoss createEntropyBasedInformationLossMetric()
      Creates an instance of the entropy-based information loss metric, which will treat generalization and suppression equally.
      Gibt zurück:
    • createEntropyBasedInformationLossMetric

      public static MetricSDNMEntropyBasedInformationLoss createEntropyBasedInformationLossMetric(double gsFactor)
      Creates an instance of the entropy-based information loss metric.
      Parameter:
      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:
    • createEntropyMetric

      public static Metric<AbstractILMultiDimensional> createEntropyMetric()
      Creates an instance of the non-monotonic non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Gibt zurück:
    • createEntropyMetric

      public static Metric<AbstractILMultiDimensional> createEntropyMetric(boolean monotonic)
      Creates an instance of the non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      Gibt zurück:
    • createEntropyMetric

      public static Metric<AbstractILMultiDimensional> createEntropyMetric(boolean monotonic, Metric.AggregateFunction function)
      Creates an instance of the non-uniform entropy metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      function - The aggregate function to be used for comparing results
      Gibt zurück:
    • createEntropyMetric

      public static Metric<AbstractILMultiDimensional> createEntropyMetric(boolean monotonic, double gsFactor)
      Creates an instance of the non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      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:
    • createEntropyMetric

      public static Metric<AbstractILMultiDimensional> createEntropyMetric(boolean monotonic, double gsFactor, Metric.AggregateFunction function)
      Creates an instance of the non-uniform entropy metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      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.
      function - The aggregate function to be used for comparing results
      Gibt zurück:
    • createEntropyMetric

      public static Metric<AbstractILMultiDimensional> createEntropyMetric(double gsFactor)
      Creates an instance of the non-monotonic non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      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:
    • createHeightMetric

      public static Metric<AbstractILMultiDimensional> createHeightMetric()
      Creates an instance of the height metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Gibt zurück:
    • createHeightMetric

      public static Metric<AbstractILMultiDimensional> createHeightMetric(Metric.AggregateFunction function)
      Creates an instance of the height metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createKLDivergenceMetric

      public static Metric<ILSingleDimensional> createKLDivergenceMetric()
      Creates an instance of the KL Divergence metric.
      Gibt zurück:
    • createLossMetric

      public static Metric<AbstractILMultiDimensional> createLossMetric()
      Creates an instance of the loss metric which treats generalization and suppression equally. The default aggregate function, which is the rank function, will be used. This metric will respect attribute weights defined in the configuration.
      Gibt zurück:
    • createLossMetric

      public static Metric<AbstractILMultiDimensional> createLossMetric(Metric.AggregateFunction function)
      Creates an instance of the loss metric which treats generalization and suppression equally. This metric will respect attribute weights defined in the configuration.
      Parameter:
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createLossMetric

      public static Metric<AbstractILMultiDimensional> createLossMetric(double gsFactor)
      Creates an instance of the loss metric with factors for weighting generalization and suppression. The default aggregate function, which is the rank function, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      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:
    • createLossMetric

      public static Metric<AbstractILMultiDimensional> createLossMetric(double gsFactor, Metric.AggregateFunction function)
      Creates an instance of the loss metric with factors for weighting generalization and suppression. This metric will respect attribute weights defined in the configuration.
      Parameter:
      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.
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createMetric

      public static Metric<?> createMetric(Metric<?> metric, int minLevel, int maxLevel)
      This method supports backwards compatibility. It will transform implementations from version 1 to implementations from version 2, if necessary.
      Parameter:
      metric -
      minLevel -
      maxLevel -
      Gibt zurück:
    • createNormalizedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createNormalizedEntropyMetric()
      Creates an instance of the normalized entropy metric. The default aggregate function, which is the sum function, will be used. This metric will respect attribute weights defined in the configuration.
      Gibt zurück:
    • createNormalizedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createNormalizedEntropyMetric(Metric.AggregateFunction function)
      Creates an instance of the normalized entropy metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric()
      Creates an instance of the non-monotonic precision metric. The default aggregate function, which is the arithmetic mean, will be used. This metric will respect attribute weights defined in the configuration.
      Gibt zurück:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(Metric.AggregateFunction function)
      Creates an instance of the non-monotonic precision metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(boolean monotonic)
      Creates an instance of the precision metric. The default aggregate function, which is the arithmetic mean, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      Gibt zurück:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(boolean monotonic, Metric.AggregateFunction function)
      Creates an instance of the precision metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      function -
      Gibt zurück:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(boolean monotonic, double gsFactor)
      Creates an instance of the precision metric. The default aggregate function, which is the arithmetic mean, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      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:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(boolean monotonic, double gsFactor, Metric.AggregateFunction function)
      Creates an instance of the precision metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      monotonic - If set to true, the monotonic variant of the metric will be created
      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.
      function -
      Gibt zurück:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(double gsFactor)
      Creates an instance of the non-monotonic precision metric. The default aggregate function, which is the arithmetic mean, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      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:
    • createPrecisionMetric

      public static Metric<AbstractILMultiDimensional> createPrecisionMetric(double gsFactor, Metric.AggregateFunction function)
      Creates an instance of the non-monotonic precision metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      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.
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createPrecomputedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedEntropyMetric(double threshold)
      Creates a potentially precomputed instance of the non-monotonic non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      Gibt zurück:
    • createPrecomputedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedEntropyMetric(double threshold, boolean monotonic)
      Creates a potentially precomputed instance of the non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      monotonic - If set to true, the monotonic variant of the metric will be created
      Gibt zurück:
    • createPrecomputedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedEntropyMetric(double threshold, boolean monotonic, Metric.AggregateFunction function)
      Creates a potentially precomputed instance of the non-uniform entropy metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      monotonic - If set to true, the monotonic variant of the metric will be created
      function - The aggregate function to be used for comparing results
      Gibt zurück:
    • createPrecomputedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedEntropyMetric(double threshold, boolean monotonic, double gsFactor)
      Creates a potentially precomputed instance of the non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      monotonic - If set to true, the monotonic variant of the metric will be created
      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:
    • createPrecomputedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedEntropyMetric(double threshold, boolean monotonic, double gsFactor, Metric.AggregateFunction function)
      Creates a potentially precomputed instance of the non-uniform entropy metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      monotonic - If set to true, the monotonic variant of the metric will be created
      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.
      function - The aggregate function to be used for comparing results
      Gibt zurück:
    • createPrecomputedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedEntropyMetric(double threshold, double gsFactor)
      Creates a potentially precomputed instance of the non-monotonic non-uniform entropy metric. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      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.
      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:
    • createPrecomputedLossMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedLossMetric(double threshold)
      Creates a potentially precomputed instance of the loss metric which treats generalization and suppression equally. The default aggregate function, which is the rank function, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      Gibt zurück:
    • createPrecomputedLossMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedLossMetric(double threshold, Metric.AggregateFunction function)
      Creates a potentially precomputed instance of the loss metric which treats generalization and suppression equally. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createPrecomputedLossMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedLossMetric(double threshold, double gsFactor)
      Creates a potentially precomputed instance of the loss metric with factors for weighting generalization and suppression. The default aggregate function, which is the rank function, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      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:
    • createPrecomputedLossMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedLossMetric(double threshold, double gsFactor, Metric.AggregateFunction function)
      Creates a potentially precomputed instance of the loss metric with factors for weighting generalization and suppression. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      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.
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createPrecomputedNormalizedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedNormalizedEntropyMetric(double threshold)
      Creates a potentially precomputed instance of the normalized entropy metric. The default aggregate function, which is the sum function, will be used. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      Gibt zurück:
    • createPrecomputedNormalizedEntropyMetric

      public static Metric<AbstractILMultiDimensional> createPrecomputedNormalizedEntropyMetric(double threshold, Metric.AggregateFunction function)
      Creates a potentially precomputed instance of the normalized entropy metric. This metric will respect attribute weights defined in the configuration.
      Parameter:
      threshold - The precomputed variant of the metric will be used if #distinctValues / #rows Ungültige Eingabe: "<"= threshold for all quasi-identifiers.
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • createPublisherPayoutMetric

      public static MetricSDNMPublisherPayout createPublisherPayoutMetric(boolean journalistAttackerModel)
      Creates an instance of the model for maximizing publisher benefit in the game-theoretic privacy model based on a cost/benefit analysis. The model treats generalization and suppression equally.
      Parameter:
      journalistAttackerModel - If set to true, the journalist attacker model will be assumed, the prosecutor model will be assumed, otherwise
      Gibt zurück:
    • createPublisherPayoutMetric

      public static MetricSDNMPublisherPayout createPublisherPayoutMetric(boolean journalistAttackerModel, double gsFactor)
      Creates an instance of the model for maximizing publisher benefit in the game-theoretic privacy model based on a cost/benefit analysis.
      Parameter:
      journalistAttackerModel - If set to true, the journalist attacker model will be assumed, the prosecutor model will be assumed, otherwise
      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:
    • createStaticMetric

      public static Metric<AbstractILMultiDimensional> createStaticMetric(Map<String,List<Double>> loss)
      Creates an instance of a metric with statically defined information loss. The default aggregate function, which is the sum-function, will be used for comparing results. This metric will respect attribute weights defined in the configuration.
      Parameter:
      loss - User defined information loss per attribute
      Gibt zurück:
    • createStaticMetric

      public static Metric<AbstractILMultiDimensional> createStaticMetric(Map<String,List<Double>> loss, Metric.AggregateFunction function)
      Creates an instance of a metric with statically defined information loss. This metric will respect attribute weights defined in the configuration.
      Parameter:
      loss - User defined information loss per attribute
      function - The aggregate function to use for comparing results
      Gibt zurück:
    • list

      public static List<MetricDescription> list()
      Returns a list of all available metrics for information loss.
      Gibt zurück:
    • getDescription

      protected static MetricDescription getDescription(Metric<?> metric)
      Returns a description for the given metric, if there is any, null otherwise.
      Parameter:
      metric -
      Gibt zurück:
    • createInstanceOfHighestScore

      public InformationLoss<?> createInstanceOfHighestScore()
      Returns an instance of the highest possible score. Lower is better.
      Gibt zurück:
    • createInstanceOfLowestScore

      public InformationLoss<?> createInstanceOfLowestScore()
      Returns an instance of the lowest possible score. Lower is better.
      Gibt zurück:
    • createMaxInformationLoss

      @Deprecated public abstract InformationLoss<?> createMaxInformationLoss()
      Veraltet.
      Returns an instance of the maximal value.
      Gibt zurück:
    • createMinInformationLoss

      @Deprecated public abstract InformationLoss<?> createMinInformationLoss()
      Veraltet.
      Returns an instance of the minimal value.
      Gibt zurück:
    • getAggregateFunction

      public Metric.AggregateFunction getAggregateFunction()
      Returns the aggregate function of a multi-dimensional metric, null otherwise.
      Gibt zurück:
    • getConfiguration

      public MetricConfiguration getConfiguration()
      Returns the configuration of this metric.
      Gibt zurück:
    • getDescription

      public MetricDescription getDescription()
      Returns a description of this metric.
      Gibt zurück:
    • getGeneralizationFactor

      public double getGeneralizationFactor()
      Returns the factor used weight generalized values.
      Gibt zurück:
    • getGeneralizationSuppressionFactor

      public double getGeneralizationSuppressionFactor()
      Returns the factor weighting generalization and suppression.
      Gibt zurück:
      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.
    • getInformationLoss

      public final InformationLossWithBound<T> getInformationLoss(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupify groupify)
      Evaluates the metric for the given node.
      Parameter:
      node - The node for which to compute the information loss
      groupify - The groupify operator of the previous check
      Gibt zurück:
      the information loss
    • getInformationLoss

      public final InformationLossWithBound<T> getInformationLoss(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry entry)
      Returns the information loss that would be induced by suppressing the given entry. The loss is not necessarily consistent with the loss that is computed by getInformationLoss(node, groupify) but is guaranteed to be comparable for different entries from the same groupify operator.
      Parameter:
      entry -
      Gibt zurück:
    • getLowerBound

      public T getLowerBound(org.deidentifier.arx.framework.lattice.Transformation<?> node)
      Returns a lower bound for the information loss for the given node. This can be used to expose the results of monotonic shares of a metric, which can significantly speed-up the anonymization process. If no such metric exists, the method returns null.
      Parameter:
      node -
      Gibt zurück:
    • getLowerBound

      public T getLowerBound(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupify groupify)
      Returns a lower bound for the information loss for the given node. This can be used to expose the results of monotonic shares of a metric, which can significantly speed-up the anonymization process. If no such metric exists the method returns null.
      Parameter:
      node -
      groupify -
      Gibt zurück:
    • getName

      public String getName()
      Returns the name of metric.
      Gibt zurück:
    • getScore

      public ILScore getScore(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupify groupify)
      Calculates the score. Note: All score functions are expected to return a score value divided by the sensitivity of the score function.
      Parameter:
      node -
      groupify -
      Gibt zurück:
    • getSuppressionFactor

      public double getSuppressionFactor()
      Returns the factor used to weight suppressed values.
      Gibt zurück:
    • initialize

      public final void initialize(org.deidentifier.arx.framework.data.DataManager manager, DataDefinition definition, org.deidentifier.arx.framework.data.Data input, org.deidentifier.arx.framework.data.GeneralizationHierarchy[] hierarchies, ARXConfiguration config)
      Initializes the metric.
      Parameter:
      manager -
      definition -
      input -
      hierarchies -
      config -
    • isAbleToHandleMicroaggregation

      public boolean isAbleToHandleMicroaggregation()
      Returns whether this metric handles microaggregation
      Gibt zurück:
    • isAbleToHandleClusteredMicroaggregation

      public boolean isAbleToHandleClusteredMicroaggregation()
      Returns whether this metric handles clustering and microaggregation
      Gibt zurück:
    • isGSFactorSupported

      public boolean isGSFactorSupported()
      Returns whether a generalization/suppression factor is supported
      Gibt zurück:
    • isIndependent

      public boolean isIndependent()
      Returns whether this metric requires the transformed data or groups to determine information loss.
      Gibt zurück:
    • isMonotonic

      public final boolean isMonotonic(double suppressionLimit)
      Returns whether this model is monotonic under the given suppression limit. Note: The suppression limit may be relative or absolute.
      Parameter:
      suppressionLimit -
      Gibt zurück:
    • isMonotonicWithGeneralization

      public final boolean isMonotonicWithGeneralization()
      Returns false if the metric is non-monotonic when using generalization.
      Gibt zurück:
    • isMonotonicWithSuppression

      public final boolean isMonotonicWithSuppression()
      Returns false if the metric is non-monotonic when using suppression.
      Gibt zurück:
    • isMultiDimensional

      public final boolean isMultiDimensional()
      Returns true if the metric is multi-dimensional.
      Gibt zurück:
    • isPrecomputed

      public boolean isPrecomputed()
      Returns whether the metric is precomputed
      Gibt zurück:
    • isScoreFunctionSupported

      public boolean isScoreFunctionSupported()
      Returns whether the metric provides a score function
      Gibt zurück:
    • isWeighted

      public final boolean isWeighted()
      Returns true if the metric is weighted.
      Gibt zurück:
    • render

      public abstract ElementData render(ARXConfiguration config)
      Renders the privacy model
      Gibt zurück:
    • toString

      public String toString()
      Returns the name of metric.
      Setzt außer Kraft:
      toString in Klasse Object
      Gibt zurück:
    • getInformationLossInternal

      protected abstract InformationLossWithBound<T> getInformationLossInternal(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupify groupify)
      Evaluates the metric for the given node.
      Parameter:
      node - The node for which to compute the information loss
      groupify - The groupify operator of the previous check
      Gibt zurück:
      the double
    • getInformationLossInternal

      protected abstract InformationLossWithBound<T> getInformationLossInternal(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry entry)
      Returns the information loss that would be induced by suppressing the given entry. The loss is not necessarily consistent with the loss that is computed by getInformationLoss(node, groupify) but is guaranteed to be comparable for different entries from the same groupify operator.
      Parameter:
      entry -
      Gibt zurück:
    • getLowerBoundInternal

      protected abstract T getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation<?> node)
      Returns a lower bound for the information loss for the given node. This can be used to expose the results of monotonic shares of a metric, which can significantly speed-up the anonymization process. If no such metric exists, simply return null.
      Parameter:
      node -
      Gibt zurück:
    • getLowerBoundInternal

      protected abstract T getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation<?> node, org.deidentifier.arx.framework.check.groupify.HashGroupify groupify)
      Returns a lower bound for the information loss for the given node. This can be used to expose the results of monotonic shares of a metric, which can significantly speed-up the anonymization process. If no such metric exists, simply return null.

      This variant of the method allows computing a monotonic share based on a groupified data representation. IMPORTANT NOTE: The groups may not have been classified correctly when the method is called, i.e., HashGroupifyEntry.isNotOutlier may not be set correctly!
      Parameter:
      node -
      groupify -
      Gibt zurück:
    • getNumRecords

      protected int getNumRecords(ARXConfiguration config, org.deidentifier.arx.framework.data.Data input)
      Returns the number of records
      Parameter:
      config -
      input -
      Gibt zurück:
    • getSubset

      protected RowSet getSubset(ARXConfiguration config)
      Returns the subset
      Parameter:
      config -
      input -
      Gibt zurück:
    • initializeInternal

      protected abstract void initializeInternal(org.deidentifier.arx.framework.data.DataManager manager, DataDefinition definition, org.deidentifier.arx.framework.data.Data input, org.deidentifier.arx.framework.data.GeneralizationHierarchy[] hierarchies, ARXConfiguration config)
      Implement this to initialize the metric.
      Parameter:
      manager -
      definition -
      input -
      hierarchies -
      config -
    • round

      protected double round(double value)
      Ignore anything but the first DIGITS digits.
      Parameter:
      value -
      Gibt zurück: