Class APRF
- java.lang.Object
-
- org.aksw.limes.core.evaluation.qualititativeMeasures.APRF
-
- All Implemented Interfaces:
IQualitativeMeasure
public abstract class APRF extends Object implements IQualitativeMeasure
This class is an abstract class for the Precision, Recall and F-Measure classes.
It contains set of methods that calculate the values of true-positive, false-positive, true-negative and false-negative which are used by evaluators classes to evaluate the mappings results.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Klaus Lyko (lyko@informatik.uni-leipzig.de), Mofeed Hassan (mounir@informatik.uni-leipzig.de)
-
-
Constructor Summary
Constructors Constructor Description APRF()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract doublecalculate(AMapping predictions, GoldStandard goldStandard)The Abstract method to be implemented for calculating the accuracy of the machine learning predictions compared to a gold standardstatic doublefalseNegative(AMapping predictions, AMapping goldStandard)The method calculates the false-negative results such that the result is claimed by a machine learning as a negative one and the claim is false.static doubletrueFalsePositive(AMapping predictions, AMapping goldStandard, boolean truePositive)The method calculates either the true positive or the false positive results which are defined as true-positive: the results classified as positive and the classification is correct while false-positive: the results classified as positive and the classification is incorrect.static doubletrueNegative(AMapping predictions, GoldStandard goldStandard)
-
-
-
Method Detail
-
trueFalsePositive
public static double trueFalsePositive(AMapping predictions, AMapping goldStandard, boolean truePositive)
The method calculates either the true positive or the false positive results which are defined as true-positive: the results classified as positive and the classification is correct while false-positive: the results classified as positive and the classification is incorrect.- Parameters:
predictions- The predictions provided by a machine learning algorithmgoldStandard- It contains the gold standard (reference mapping) combined with the source and target URIstruePositive- A flag switches the calculation between true positive (=true) and false positive(=false)- Returns:
- double - This returns either True positive or False positive based on the flag value
-
falseNegative
public static double falseNegative(AMapping predictions, AMapping goldStandard)
The method calculates the false-negative results such that the result is claimed by a machine learning as a negative one and the claim is false.- Parameters:
predictions- The predictions provided by a machine learning algorithmgoldStandard- It contains the gold standard (reference mapping) combined with the source and target URIs- Returns:
- double This returns the number of false negative links
-
trueNegative
public static double trueNegative(AMapping predictions, GoldStandard goldStandard)
-
calculate
public abstract double calculate(AMapping predictions, GoldStandard goldStandard)
The Abstract method to be implemented for calculating the accuracy of the machine learning predictions compared to a gold standard- Specified by:
calculatein interfaceIQualitativeMeasure- Parameters:
predictions- The predictions provided by a machine learning algorithmgoldStandard- It contains the gold standard (reference mapping) combined with the source and target URIs- Returns:
- double - This returns the calculated accuracy
-
-