# RiskModelPopulationUniqueness (ARX GUI Documentation)

org.deidentifier.arx.risk

## Class RiskModelPopulationUniqueness

- java.lang.Object
- - org.deidentifier.arx.risk.RiskModelPopulationUniqueness

-     public class RiskModelPopulationUniqueness
      extends java.lang.Object

  Class for risks based on population uniqueness. It implements Dankar et al.'s decision rule.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `RiskModelPopulationUniqueness.PopulationUniquenessModel` The statistical model used for computing Dankar's estimate.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RiskModelPopulationUniqueness(ARXPopulationModel model, RiskModelHistogram classes, ARXSolverConfiguration config)` Creates a new instance

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `checkInterrupt()` Checks for interrupts
    `double` | `getFractionOfUniqueTuples(RiskModelPopulationUniqueness.PopulationUniquenessModel model)` Estimated number of unique tuples in the population according to the given model
    `double` | `getFractionOfUniqueTuplesDankar()` Estimated number of unique tuples in the population according to Dankar's decision rule
    `double` | `getFractionOfUniqueTuplesDankar(boolean useZayatzAsFallback)` Estimated number of unique tuples in the population according to Dankar's decision rule
    `double` | `getFractionOfUniqueTuplesPitman()` Estimated number of unique tuples in the population according to Pitman's statistical model
    `double` | `getFractionOfUniqueTuplesSNB()` Estimated number of unique tuples in the population according to the SNB statistical model
    `double` | `getFractionOfUniqueTuplesZayatz()` Estimated number of unique tuples in the population according to Zayatz's statistical model
    `protected RiskModelHistogram` | `getHistogram()`
    `protected double` | `getNumClasses()` Returns the number of classes
    `protected double` | `getNumClassesOfSize(int size)` Returns the number of classes of the given size.
    `double` | `getNumUniqueTuples(RiskModelPopulationUniqueness.PopulationUniquenessModel model)` Estimated number of unique tuples in the population according to the given model
    `double` | `getNumUniqueTuplesDankar()` Estimated number of unique tuples in the population according to Dankar's decision rule.
    `double` | `getNumUniqueTuplesDankar(boolean useZayatzAsFallback)` Estimated number of unique tuples in the population according to Dankar's decision rule
    `double` | `getNumUniqueTuplesPitman()` Estimated number of unique tuples in the population according to Pitman's statistical model
    `double` | `getNumUniqueTuplesSNB()` Estimated number of unique tuples in the population according to the SNB model
    `double` | `getNumUniqueTuplesZayatz()` Estimated number of unique tuples in the population according to Zayatz's statistical model
    `protected ARXPopulationModel` | `getPopulationModel()`
    `protected double` | `getPopulationSize()` Returns the population size
    `RiskModelPopulationUniqueness.PopulationUniquenessModel` | `getPopulationUniquenessModel()` Returns the statistical model, used by Dankar et al.'s decision rule for estimating population uniqueness
    `protected double` | `getSampleSize()` Returns the sample size
    `protected double` | `getSamplingFraction()` Returns the sample fraction
    `boolean` | `isAvailableEstimate(RiskModelPopulationUniqueness.PopulationUniquenessModel model)` Returns whether the according estimate is available
    `boolean` | `isAvailableEstimateDankar()` Returns whether the according estimate is available
    `boolean` | `isAvailableEstimatePitman()` Returns whether the according estimate is available
    `boolean` | `isAvailableEstimateSNB()` Returns whether the according estimate is available
    `boolean` | `isAvailableEstimateZayatz()` Returns whether the according estimate is available
    `protected void` | `setProgress(int progress)` Sets the progress

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RiskModelPopulationUniqueness

          public RiskModelPopulationUniqueness(ARXPopulationModel model,
                                       RiskModelHistogram classes,
                                       ARXSolverConfiguration config)

      Creates a new instance
      Parameters:
        `model` -
        `classes` -
        `config` -

  - ### Method Detail

    - #### getFractionOfUniqueTuples

          public double getFractionOfUniqueTuples(RiskModelPopulationUniqueness.PopulationUniquenessModel model)

      Estimated number of unique tuples in the population according to the given model

    - #### getFractionOfUniqueTuplesDankar

          public double getFractionOfUniqueTuplesDankar()

      Estimated number of unique tuples in the population according to Dankar's decision rule

    - #### getFractionOfUniqueTuplesDankar

          public double getFractionOfUniqueTuplesDankar(boolean useZayatzAsFallback)

      Estimated number of unique tuples in the population according to Dankar's decision rule
      Parameters:
        `useZayatzAsFallback` -

    - #### getFractionOfUniqueTuplesPitman

          public double getFractionOfUniqueTuplesPitman()

      Estimated number of unique tuples in the population according to Pitman's statistical model

    - #### getFractionOfUniqueTuplesSNB

          public double getFractionOfUniqueTuplesSNB()

      Estimated number of unique tuples in the population according to the SNB statistical model

    - #### getFractionOfUniqueTuplesZayatz

          public double getFractionOfUniqueTuplesZayatz()

      Estimated number of unique tuples in the population according to Zayatz's statistical model

    - #### getNumUniqueTuples

          public double getNumUniqueTuples(RiskModelPopulationUniqueness.PopulationUniquenessModel model)

      Estimated number of unique tuples in the population according to the given model

    - #### getNumUniqueTuplesDankar

          public double getNumUniqueTuplesDankar()

      Estimated number of unique tuples in the population according to Dankar's decision rule.

    - #### getNumUniqueTuplesDankar

          public double getNumUniqueTuplesDankar(boolean useZayatzAsFallback)

      Estimated number of unique tuples in the population according to Dankar's decision rule
      Parameters:
        `useZayatzAsFallback` -

    - #### getNumUniqueTuplesPitman

          public double getNumUniqueTuplesPitman()

      Estimated number of unique tuples in the population according to Pitman's statistical model

    - #### getNumUniqueTuplesSNB

          public double getNumUniqueTuplesSNB()

      Estimated number of unique tuples in the population according to the SNB model

    - #### getNumUniqueTuplesZayatz

          public double getNumUniqueTuplesZayatz()

      Estimated number of unique tuples in the population according to Zayatz's statistical model

    - #### getPopulationUniquenessModel

          public RiskModelPopulationUniqueness.PopulationUniquenessModel getPopulationUniquenessModel()

      Returns the statistical model, used by Dankar et al.'s decision rule for estimating population uniqueness

    - #### isAvailableEstimate

          public boolean isAvailableEstimate(RiskModelPopulationUniqueness.PopulationUniquenessModel model)

      Returns whether the according estimate is available
      Returns:

    - #### isAvailableEstimateDankar

          public boolean isAvailableEstimateDankar()

      Returns whether the according estimate is available
      Returns:

    - #### isAvailableEstimatePitman

          public boolean isAvailableEstimatePitman()

      Returns whether the according estimate is available
      Returns:

    - #### isAvailableEstimateSNB

          public boolean isAvailableEstimateSNB()

      Returns whether the according estimate is available
      Returns:

    - #### isAvailableEstimateZayatz

          public boolean isAvailableEstimateZayatz()

      Returns whether the according estimate is available
      Returns:

    - #### checkInterrupt

          protected void checkInterrupt()

      Checks for interrupts

    - #### getHistogram

          protected RiskModelHistogram getHistogram()

      Returns:
        the classes

    - #### getNumClasses

          protected double getNumClasses()

      Returns the number of classes
      Returns:

    - #### getNumClassesOfSize

          protected double getNumClassesOfSize(int size)

      Returns the number of classes of the given size. This method is only efficient for smaller class sizes.
      Parameters:
        `size` -
      Returns:

    - #### getPopulationModel

          protected ARXPopulationModel getPopulationModel()

      Returns:
        the populationModel

    - #### getPopulationSize

          protected double getPopulationSize()

      Returns the population size
      Returns:

    - #### getSampleSize

          protected double getSampleSize()

      Returns the sample size
      Returns:

    - #### getSamplingFraction

          protected double getSamplingFraction()

      Returns the sample fraction
      Returns:

    - #### setProgress

          protected void setProgress(int progress)

      Sets the progress
      Parameters:
        `progress` -