# ProfitabilityProsecutor (ARX Developer Documentation)

org.deidentifier.arx.criteria

## Class ProfitabilityProsecutor

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.ImplicitPrivacyCriterion
    - - org.deidentifier.arx.criteria.ProfitabilityProsecutor

- All Implemented Interfaces:
    java.io.Serializable
  Direct Known Subclasses:
    ProfitabilityJournalist

      public class ProfitabilityProsecutor
      extends ImplicitPrivacyCriterion

  Privacy model for the game theoretic approach proposed in: A Game Theoretic Framework for Analyzing Re-Identification Risk. Zhiyu Wan, Yevgeniy Vorobeychik, Weiyi Xia, Ellen Wright Clayton, Murat Kantarcioglu, Ranjit Ganta, Raymond Heatherly, Bradley A. Malin PLOS|ONE. 2015.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ProfitabilityProsecutor()` Creates a new instance of game theoretic approach proposed in: A Game Theoretic Framework for Analyzing Re-Identification Risk.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `ProfitabilityProsecutor` | `clone()` Clone
    `PrivacyCriterion` | `clone(DataSubset subset)` Clone for local recoding
    `protected ARXCostBenefitConfiguration` | `getConfiguration()` Returns the current configuration
    `DataSubset` | `getDataSubset()` If a privacy model uses a data subset, it must overwrite this method
    `int` | `getRequirements()` Returns the criterion's requirements.
    `protected double` | `getSuccessProbability(HashGroupifyEntry entry)` Returns the success probability.
    `void` | `initialize(DataManager manager, ARXConfiguration config)` Override this to initialize the criterion.
    `boolean` | `isAnonymous(Transformation transformation, HashGroupifyEntry entry)` Implement this, to enforce the criterion.
    `boolean` | `isLocalRecodingSupported()` Returns whether the criterion supports local recoding.
    `boolean` | `isSubsetAvailable()` If a privacy model uses a data subset, it must overwrite this method
    `ElementData` | `render()` Renders the privacy model
    `java.lang.String` | `toString()` Returns a string representation.
    `protected java.lang.String` | `toString(java.lang.String attackerModel)` Returns a string representation

    - ### Methods inherited from class org.deidentifier.arx.criteria.PrivacyCriterion

      `getMinimalClassSize, getPopulationModel, getRiskThresholdJournalist, getRiskThresholdMarketer, getRiskThresholdProsecutor, getSubset, isMinimalClassSizeAvailable, isMonotonicWithGeneralization, isMonotonicWithSuppression, isSampleBased`

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

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

- - ### Constructor Detail

    - #### ProfitabilityProsecutor

          public ProfitabilityProsecutor()

      Creates a new instance of game theoretic approach proposed in: A Game Theoretic Framework for Analyzing Re-Identification Risk. Zhiyu Wan, Yevgeniy Vorobeychik, Weiyi Xia, Ellen Wright Clayton, Murat Kantarcioglu, Ranjit Ganta, Raymond Heatherly, Bradley A. Malin PLOS|ONE. 2015.

  - ### Method Detail

    - #### clone

          public ProfitabilityProsecutor clone()

      Description copied from class: `PrivacyCriterion`
      Clone
      Specified by:
        `clone` in class `PrivacyCriterion`

    - #### clone

          public PrivacyCriterion clone(DataSubset subset)

      Description copied from class: `PrivacyCriterion`
      Clone for local recoding
      Overrides:
        `clone` in class `PrivacyCriterion`

    - #### getDataSubset

          public DataSubset getDataSubset()

      Description copied from class: `PrivacyCriterion`
      If a privacy model uses a data subset, it must overwrite this method
      Overrides:
        `getDataSubset` in class `PrivacyCriterion`
      Returns:

    - #### getRequirements

          public int getRequirements()

      Description copied from class: `PrivacyCriterion`
      Returns the criterion's requirements.
      Specified by:
        `getRequirements` in class `PrivacyCriterion`
      Returns:

    - #### initialize

          public void initialize(DataManager manager,
                        ARXConfiguration config)

      Description copied from class: `PrivacyCriterion`
      Override this to initialize the criterion.
      Overrides:
        `initialize` in class `PrivacyCriterion`
        `config` - TODO

    - #### isAnonymous

          public boolean isAnonymous(Transformation transformation,
                            HashGroupifyEntry entry)

      Description copied from class: `PrivacyCriterion`
      Implement this, to enforce the criterion.
      Specified by:
        `isAnonymous` in class `PrivacyCriterion`
      Parameters:
        `transformation` - TODO
      Returns:

    - #### isLocalRecodingSupported

          public boolean isLocalRecodingSupported()

      Description copied from class: `PrivacyCriterion`
      Returns whether the criterion supports local recoding.
      Specified by:
        `isLocalRecodingSupported` in class `PrivacyCriterion`
      Returns:

    - #### isSubsetAvailable

          public boolean isSubsetAvailable()

      Description copied from class: `PrivacyCriterion`
      If a privacy model uses a data subset, it must overwrite this method
      Overrides:
        `isSubsetAvailable` in class `PrivacyCriterion`
      Returns:

    - #### render

          public ElementData render()

      Description copied from class: `PrivacyCriterion`
      Renders the privacy model
      Specified by:
        `render` in class `PrivacyCriterion`
      Returns:

    - #### toString

          public java.lang.String toString()

      Description copied from class: `PrivacyCriterion`
      Returns a string representation.
      Specified by:
        `toString` in class `PrivacyCriterion`

    - #### getConfiguration

          protected ARXCostBenefitConfiguration getConfiguration()

      Returns the current configuration
      Returns:

    - #### getSuccessProbability

          protected double getSuccessProbability(HashGroupifyEntry entry)

      Returns the success probability. If the game is configured to use the journalist risk, but no population table is available, we silently default to the prosecutor model.
      Parameters:
        `entry` -
      Returns:

    - #### toString

          protected java.lang.String toString(java.lang.String attackerModel)

      Returns a string representation