Class AWombat

  • Direct Known Subclasses:
    WombatComplete, WombatSimple

    public abstract class AWombat
    extends ACoreMLAlgorithm
    This class uses Least General Generalization (LGG) to learn Link Specifications (LS)
    Version:
    Jun 7, 2016
    Author:
    Mohamed Sherif (sherif@informatik.uni-leipzig.de)
    • Constructor Detail

      • AWombat

        protected AWombat()
    • Method Detail

      • createNode

        protected RefinementNode createNode​(AMapping mapping,
                                            String metricExpr)
        Create new RefinementNode using either real or pseudo-F-Measure
        Parameters:
        mapping - of the node
        metricExpr - learning specifications
        Returns:
        new RefinementNode
      • fMeasure

        protected final double fMeasure​(AMapping predictions)
        calculate either a real or a pseudo-F-Measure
        Parameters:
        predictions - Mapping
        Returns:
        F-measure
      • getMappingOfMetricExpression

        protected final AMapping getMappingOfMetricExpression​(String metricExpression,
                                                              Tree<? extends RefinementNode> root)
        Looks first for the input metricExpression in the already constructed tree, if found the corresponding mapping is returned. Otherwise, the SetConstraintsMapper is generate the mapping from the metricExpression.
        Parameters:
        metricExpression - learning specifications
        Returns:
        Mapping corresponding to the input metric expression
      • predict

        protected AMapping predict​(ACache source,
                                   ACache target,
                                   MLResults mlModel)
        Description copied from class: ACoreMLAlgorithm
        Predict/generate links from source to target based on mlModel.
        Specified by:
        predict in class ACoreMLAlgorithm
        Parameters:
        source - Cache
        target - Cache
        mlModel - result of training phase
        Returns:
        the mapping from source to target
      • isUnsupervised

        public boolean isUnsupervised()
      • precision

        protected final double precision​(AMapping predictions)
        calculate either a real or a pseudo-Precision
        Parameters:
        predictions - Mapping
        Returns:
        precision
      • recall

        protected final double recall​(AMapping predictions)
        calculate either a real or a pseudo-Recall
        Parameters:
        predictions - Mapping
        Returns:
        recall
      • fillSampleSourceTargetCaches

        protected final void fillSampleSourceTargetCaches​(AMapping sample)
      • findInitialClassifiers

        protected final List<ExtendedClassifier> findInitialClassifiers()
        Returns:
        initial classifiers
      • getBestNode

        protected final <T extends RefinementNodeTree<T> getBestNode​(Tree<T> root)
        Get the most promising node as the node with the best F-score
        Parameters:
        root - The whole refinement tree
        Returns:
        best node from the input tree root
      • getMostPromisingNode

        protected final <T extends RefinementNodeTree<T> getMostPromisingNode​(Tree<T> root)
        Get the most promising node as the node with the best F-score
        Parameters:
        root - The whole refinement tree
        Returns:
        most promising node from the input tree root
      • saveMapping

        protected final boolean saveMapping()
      • isVerbose

        protected boolean isVerbose()
      • getOverAllPenaltyWeight

        protected double getOverAllPenaltyWeight()
      • getChildrenPenaltyWeight

        protected double getChildrenPenaltyWeight()
      • getComplexityPenaltyWeight

        protected double getComplexityPenaltyWeight()
      • getMinPropertyCoverage

        protected double getMinPropertyCoverage()
      • getPropertyLearningRate

        protected double getPropertyLearningRate()
      • getBeta

        protected double getBeta()
      • getIterationTimeInMinutes

        protected int getIterationTimeInMinutes()
      • getExcutionTimeInMinutes

        protected int getExcutionTimeInMinutes()
      • getMaxFitnessThreshold

        protected double getMaxFitnessThreshold()
      • getMaxIterationNumber

        protected int getMaxIterationNumber()
      • getMaxRefinmentTreeSize

        protected int getMaxRefinmentTreeSize()
      • getAtomicMeasures

        protected Set<String> getAtomicMeasures()