public class MetricMDNMLoss extends AbstractMetricMultiDimensional
Metric.AggregateFunction
Constructor and Description |
---|
MetricMDNMLoss()
Default constructor which treats all transformation methods equally.
|
MetricMDNMLoss(double gsFactor,
Metric.AggregateFunction function)
A constructor that allows to define a factor weighting generalization and suppression.
|
MetricMDNMLoss(Metric.AggregateFunction function)
Default constructor which treats all transformation methods equally.
|
Modifier and Type | Method and Description |
---|---|
MetricConfiguration |
getConfiguration()
Returns the configuration of this metric.
|
double |
getGeneralizationFactor()
Returns the factor used weight generalized values.
|
double |
getGeneralizationSuppressionFactor()
Returns the factor weighting generalization and suppression.
|
protected ILMultiDimensionalWithBound |
getInformationLossInternal(org.deidentifier.arx.framework.lattice.Transformation node,
org.deidentifier.arx.framework.check.groupify.HashGroupify g)
Evaluates the metric for the given node.
|
protected ILMultiDimensionalWithBound |
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.
|
protected AbstractILMultiDimensional |
getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node)
Returns a lower bound for the information loss for the given node.
|
protected AbstractILMultiDimensional |
getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node,
org.deidentifier.arx.framework.check.groupify.HashGroupify g)
Returns a lower bound for the information loss for the given node.
|
java.lang.String |
getName()
Returns the name of metric.
|
protected DomainShare[] |
getShares()
For subclasses.
|
double |
getSuppressionFactor()
Returns the factor used to weight suppressed values.
|
protected 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.
|
protected boolean |
isAbleToHandleMicroaggregation()
Returns whether this metric handles microaggregation
|
protected double |
normalizeAggregated(double aggregate)
Normalizes the aggregate.
|
protected double |
normalizeGeneralized(double aggregate,
int dimension)
Normalizes the aggregate.
|
java.lang.String |
toString()
Returns the name of metric.
|
createInformationLoss, createInformationLossWithBound, createInformationLossWithoutBound, createMaxInformationLoss, createMinInformationLoss, getAggregateFunction, getAggregateFunctions, getDimensions, getDimensionsAggregated, getDimensionsGeneralized, getMicroaggregationFunctions, getMicroaggregationStartIndex, initialize, setMax, setMin
createAECSMetric, createAECSMetric, createAmbiguityMetric, createDiscernabilityMetric, createDiscernabilityMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createEntropyMetric, createHeightMetric, createHeightMetric, createKLDivergenceMetric, createLossMetric, createLossMetric, createLossMetric, createLossMetric, createMetric, createNormalizedEntropyMetric, createNormalizedEntropyMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecisionMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedEntropyMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedLossMetric, createPrecomputedNormalizedEntropyMetric, createPrecomputedNormalizedEntropyMetric, createStaticMetric, createStaticMetric, getDescription, getDescription, getInformationLoss, getInformationLoss, getLowerBound, getLowerBound, getNumRecords, getSubset, initialize, isIndependent, isMonotonic, isMultiDimensional, isWeighted, list, round
public MetricMDNMLoss()
public MetricMDNMLoss(Metric.AggregateFunction function)
function
- public MetricMDNMLoss(double gsFactor, Metric.AggregateFunction function)
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
- public MetricConfiguration getConfiguration()
getConfiguration
in class Metric<AbstractILMultiDimensional>
public double getGeneralizationFactor()
Metric
getGeneralizationFactor
in class Metric<AbstractILMultiDimensional>
public double getGeneralizationSuppressionFactor()
Metric
getGeneralizationSuppressionFactor
in class Metric<AbstractILMultiDimensional>
public java.lang.String getName()
Metric
getName
in class Metric<AbstractILMultiDimensional>
public double getSuppressionFactor()
Metric
getSuppressionFactor
in class Metric<AbstractILMultiDimensional>
public java.lang.String toString()
Metric
toString
in class Metric<AbstractILMultiDimensional>
protected ILMultiDimensionalWithBound getInformationLossInternal(org.deidentifier.arx.framework.lattice.Transformation node, org.deidentifier.arx.framework.check.groupify.HashGroupify g)
Metric
getInformationLossInternal
in class Metric<AbstractILMultiDimensional>
node
- The node for which to compute the information lossg
- The groupify operator of the previous checkprotected ILMultiDimensionalWithBound getInformationLossInternal(org.deidentifier.arx.framework.lattice.Transformation node, org.deidentifier.arx.framework.check.groupify.HashGroupifyEntry entry)
Metric
getInformationLoss(node, groupify)
but is guaranteed to be comparable for
different entries from the same groupify operator.getInformationLossInternal
in class Metric<AbstractILMultiDimensional>
protected AbstractILMultiDimensional getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node)
Metric
null
.getLowerBoundInternal
in class Metric<AbstractILMultiDimensional>
protected AbstractILMultiDimensional getLowerBoundInternal(org.deidentifier.arx.framework.lattice.Transformation node, org.deidentifier.arx.framework.check.groupify.HashGroupify g)
Metric
null
. getLowerBoundInternal
in class Metric<AbstractILMultiDimensional>
protected DomainShare[] getShares()
protected 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)
Metric
initializeInternal
in class AbstractMetricMultiDimensional
protected boolean isAbleToHandleMicroaggregation()
isAbleToHandleMicroaggregation
in class AbstractMetricMultiDimensional
protected double normalizeGeneralized(double aggregate, int dimension)
aggregate
- dimension
- protected double normalizeAggregated(double aggregate)
aggregate
- dimension
-