org.deidentifier.arx.criteria

## Class RiskBasedCriterion

- java.lang.Object
- - org.deidentifier.arx.criteria.PrivacyCriterion
  - - org.deidentifier.arx.criteria.SampleBasedCriterion
    - - org.deidentifier.arx.criteria.RiskBasedCriterion

All Implemented Interfaces:
  java.io.Serializable

Direct Known Subclasses:
  AverageReidentificationRisk, PopulationUniqueness, SampleUniqueness

    public abstract class RiskBasedCriterion
    extends SampleBasedCriterion

Abstract class for criteria that ensure that a certain risk measure is lower than or equal to a given threshold

Author:
  Fabian Prasser
See Also:
  Serialized Form

### Constructor Summary

Constructors
Constructor and Description
`RiskBasedCriterion(boolean monotonicWithSuppression, boolean monotonicWithGeneralization, double riskThreshold)` Creates a new instance of this criterion.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `enforce(HashGroupifyDistribution distribution, int numMaxSuppressedOutliers)` This method enforces the criterion on the current hash table.
`int` `getRequirements()` Returns the criterion's requirements.
`double` `getRiskThreshold()` Returns the risk threshold

### Methods inherited from class org.deidentifier.arx.criteria.SampleBasedCriterion

`isAnonymous, isSampleBased`

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

`clone, clone, getDataSubset, getMinimalClassSize, getPopulationModel, getRiskThresholdJournalist, getRiskThresholdMarketer, getRiskThresholdProsecutor, getSubset, initialize, isHeuristicSearchSupported, isHeuristicSearchWithTimeLimitSupported, isLocalRecodingSupported, isMinimalClassSizeAvailable, isMonotonicWithGeneralization, isMonotonicWithSuppression, isOptimalSearchSupported, isSubsetAvailable, render, toString`

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

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

### Constructor Detail

#### RiskBasedCriterion

    public RiskBasedCriterion(boolean monotonicWithSuppression,
                              boolean monotonicWithGeneralization,
                              double riskThreshold)

Creates a new instance of this criterion.

Parameters:
  `monotonicWithSuppression` -
  `monotonicWithGeneralization` -
  `riskThreshold` -

### Method Detail

#### enforce

    public void enforce(HashGroupifyDistribution distribution,
                        int numMaxSuppressedOutliers)

Description copied from class: `SampleBasedCriterion`
This method enforces the criterion on the current hash table. Criteria can be enforced by suppressing classes in the distribution by passing a PrivacyCondition. Criteria may abort early, if the threshold is reached (`distribution.getNumOfSuppressedTuples() > numMaxSuppressedOutliers`).

Specified by:
  `enforce` in class `SampleBasedCriterion`

#### getRequirements

    public int getRequirements()

Description copied from class: `PrivacyCriterion`
Returns the criterion's requirements.

Specified by:
  `getRequirements` in class `PrivacyCriterion`
Returns:

#### getRiskThreshold

    public double getRiskThreshold()

Returns the risk threshold

Returns: