Class APRF

  • All Implemented Interfaces:
    IQualitativeMeasure
    Direct Known Subclasses:
    Accuracy, APseudoPRF, AUC, FMeasure, Precision, Recall

    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 Detail

      • APRF

        public APRF()
    • 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 algorithm
        goldStandard - It contains the gold standard (reference mapping) combined with the source and target URIs
        truePositive - 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 algorithm
        goldStandard - 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:
        calculate in interface IQualitativeMeasure
        Parameters:
        predictions - The predictions provided by a machine learning algorithm
        goldStandard - It contains the gold standard (reference mapping) combined with the source and target URIs
        Returns:
        double - This returns the calculated accuracy