Class APseudoPRF

  • All Implemented Interfaces:
    IQualitativeMeasure
    Direct Known Subclasses:
    PseudoFMeasure, PseudoPrecision, PseudoRecall

    public abstract class APseudoPRF
    extends APRF
    This class is an abstract class for the Pseudo Precision, Pseudo Recall and Pseudo F-Measure classes.
    It extends the abstract class PRF and implements additional methods that sets, gets and checks some flags values required for pseudo-measures. to switch on/off the claculation mode of being symmetric in case of precision or retrieving one-to-one mapping
    Since:
    1.0
    Version:
    1.0
    Author:
    Mofeed Hassan (mounir@informatik.uni-leipzig.de)
    • Field Detail

      • symmetricPrecision

        public boolean symmetricPrecision
        A flag specifies if the calculated precision is symmetric or not
    • Constructor Detail

      • APseudoPRF

        public APseudoPRF()
    • Method Detail

      • 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
        Specified by:
        calculate in class APRF
        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
      • isUse1To1Mapping

        public boolean isUse1To1Mapping()
        The method checks if one-to-one mapping is used
        Returns:
        boolean - true if one-to-one mapping is used
      • getUse1To1Mapping

        public boolean getUse1To1Mapping()
        The method retrieves the flag value of one-to-one mapping
        Returns:
        boolean - the value of the one-to-one flag
      • setUse1To1Mapping

        public void setUse1To1Mapping​(boolean use1To1Mapping)
        The method sets the one-to-one mapping flag
        Parameters:
        use1To1Mapping - The boolean value to be assigned to the flag
      • isSymmetricPrecision

        public boolean isSymmetricPrecision()
        The method checks if symmetric precision flag is used
        Returns:
        boolean - true if symmetric precision is used
      • setSymmetricPrecision

        public void setSymmetricPrecision​(boolean symmetricPrecision)
        The method sets the symmetric precision flag
        Parameters:
        symmetricPrecision - The boolean value to be assigned to the flag