Klasse HierarchyBuilderPriorityBased<T>

java.lang.Object
org.deidentifier.arx.aggregates.HierarchyBuilder<T>
org.deidentifier.arx.aggregates.HierarchyBuilderPriorityBased<T>
Typparameter:
T -
Alle implementierten Schnittstellen:
Serializable

public class HierarchyBuilderPriorityBased<T> extends HierarchyBuilder<T> implements Serializable
This class enables building hierarchies mostly for categorical variables by iteratively removing the value with lowest priority
Siehe auch:
  • Methodendetails

    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(DataType<T> type)
      Create a new instance, prioritized by the order implied by the data type in order highest to lowest and a maximum of 10 levels.
      Typparameter:
      T -
      Parameter:
      dataType -
      Gibt zurück:
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(DataType<T> type, HierarchyBuilderPriorityBased.Priority priority)
      Create a new instance, prioritized by the order implied by the data type and a maximum of 10 levels.
      Typparameter:
      T -
      Parameter:
      priority -
      dataType -
      Gibt zurück:
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(DataType<T> type, HierarchyBuilderPriorityBased.Priority priority, int maxLevels)
      Create a new instance, prioritized by the order implied by the data type.
      Typparameter:
      T -
      Parameter:
      maxLevels -
      dataType -
      Gibt zurück:
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(File file) throws IOException
      Loads a builder specification from the given file.
      Typparameter:
      T -
      Parameter:
      file -
      Gibt zurück:
      Löst aus:
      IOException
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(Map<String,Integer> priorities)
      Create a new instance, prioritized by the order provided in the given array (highest to lowest) with a maximum of 10 levels.
      Typparameter:
      T -
      Parameter:
      priorities -
      Gibt zurück:
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(Map<String,Integer> priorities, HierarchyBuilderPriorityBased.Priority priority)
      Create a new instance, prioritized by the order provided in the given array with the given order with a maximum of 10 levels.
      Typparameter:
      T -
      Parameter:
      priorities -
      priority -
      Gibt zurück:
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(Map<String,Integer> priorities, HierarchyBuilderPriorityBased.Priority priority, int maxLevels)
      Create a new instance, prioritized by the order provided in the given array (highest to lowest)
      Typparameter:
      T -
      Parameter:
      priorities -
      priority -
      maxLevels -
      Gibt zurück:
    • create

      public static <T> HierarchyBuilderPriorityBased<T> create(String file) throws IOException
      Loads a builder specification from the given file.
      Typparameter:
      T -
      Parameter:
      file -
      Gibt zurück:
      Löst aus:
      IOException
    • build

      public AttributeType.Hierarchy build()
      Creates a new hierarchy, based on the predefined specification.
      Angegeben von:
      build in Klasse HierarchyBuilder<T>
      Gibt zurück:
    • build

      public AttributeType.Hierarchy build(String[] data)
      Creates a new hierarchy, based on the predefined specification.
      Angegeben von:
      build in Klasse HierarchyBuilder<T>
      Parameter:
      data - - Prioritized from highest to lowest
      Gibt zurück:
    • getDataType

      public DataType<T> getDataType()
      Gibt zurück:
      the type
    • getMaxLevels

      public int getMaxLevels()
      Gets the maximal number of levels
      Gibt zurück:
      the maxLevels
    • getPriorities

      public Map<String,Integer> getPriorities()
      Gibt zurück:
      the priorities
    • getPriority

      Gibt zurück:
      the priority
    • isDomainPropertiesAvailable

      public boolean isDomainPropertiesAvailable()
      Returns whether domain-properties are available for this builder. Currently, this information is only used for evaluating information loss with the generalized loss metric for attributes with functional redaction-based hierarchies.
      Gibt zurück:
    • prepare

      public int[] prepare(String[] data)
      Prepares the builder. Returns a list of the number of equivalence classes per level
      Angegeben von:
      prepare in Klasse HierarchyBuilder<T>
      Parameter:
      data - In prioritized order, with highest priority to lowest priority
      Gibt zurück:
    • setMaxLevels

      public void setMaxLevels(int maxLevels)
      Sets the maximal number of levels
      Parameter:
      maxLevels - the maxLevels to set