Class NormalizedLogRatioConfirmationMeasure
java.lang.Object
org.aksw.palmetto.calculations.direct.AbstractUndefinedResultHandlingConfirmationMeasure
org.aksw.palmetto.calculations.direct.NormalizedLogRatioConfirmationMeasure
- All Implemented Interfaces:
ConfirmationMeasure,DirectConfirmationMeasure,LogBasedCalculation
public class NormalizedLogRatioConfirmationMeasure
extends AbstractUndefinedResultHandlingConfirmationMeasure
implements LogBasedCalculation
This confirmation measure calculates the logarithm of the ratio between the
joint probability of W' and W* and the product of the two marginal
probabilities. The result is normalized with the logarithm of the joint
probability of W' and W*. result = log((P(W',W*) +
e)/(P(W')*P(W*)))/log(P(W',W*) + e)
Another name for it is normalized pointwise mutual information (NPMI).
The e is defined by
LogBasedCalculation.EPSILON.- Author:
- Michael Röder
-
Field Summary
Fields inherited from class org.aksw.palmetto.calculations.direct.AbstractUndefinedResultHandlingConfirmationMeasure
resultIfCalcUndefinedFields inherited from interface org.aksw.palmetto.calculations.direct.LogBasedCalculation
EPSILON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble[]calculateConfirmationValues(SubsetProbabilities subsetProbabilities)Calculates the confirmation values for the given subset probabilities.getName()Returns the name of the measure.Methods inherited from class org.aksw.palmetto.calculations.direct.AbstractUndefinedResultHandlingConfirmationMeasure
getResultIfCalcUndefined, setResultIfCalcUndefined
-
Constructor Details
-
NormalizedLogRatioConfirmationMeasure
public NormalizedLogRatioConfirmationMeasure() -
NormalizedLogRatioConfirmationMeasure
public NormalizedLogRatioConfirmationMeasure(double resultIfCalcUndefined)
-
-
Method Details
-
calculateConfirmationValues
Description copied from interface:DirectConfirmationMeasureCalculates the confirmation values for the given subset probabilities.- Specified by:
calculateConfirmationValuesin interfaceDirectConfirmationMeasure- Parameters:
subsetProbabilities- subset probabilities used for the calculation- Returns:
- confirmation values
-
getName
Description copied from interface:ConfirmationMeasureReturns the name of the measure.- Specified by:
getNamein interfaceConfirmationMeasure- Returns:
- the name of the measure.
-