Class WombatSimple


  • public class WombatSimple
    extends AWombat
    Simple implementation of the Wombat algorithm Fast implementation, that is not complete
    Version:
    Jun 7, 2016
    Author:
    Mohamed Sherif (sherif@informatik.uni-leipzig.de)
    • Constructor Detail

      • WombatSimple

        protected WombatSimple()
        WombatSimple constructor.
    • Method Detail

      • init

        protected void init​(List<LearningParameter> lp,
                            ACache sourceCache,
                            ACache targetCache)
        Description copied from class: ACoreMLAlgorithm
        Initialize the core ML algorithm.
        Overrides:
        init in class AWombat
        Parameters:
        lp - learning parameters
        sourceCache - the source cache
        targetCache - the target cache
      • learn

        protected MLResults learn​(AMapping trainingData)
        Description copied from class: ACoreMLAlgorithm
        Learning method for supervised core ML algorithm implementations, where the confidence values for each pair in the trainingData determine its truth degree.
        Specified by:
        learn in class ACoreMLAlgorithm
        Parameters:
        trainingData - used for learning
        Returns:
        wrap with results
      • learn

        protected MLResults learn​(PseudoFMeasure pfm)
        Description copied from class: ACoreMLAlgorithm
        Learning method for unsupervised core ML algorithm implementations.
        Specified by:
        learn in class ACoreMLAlgorithm
        Parameters:
        pfm - pseudo F-measure for unsupervised learning
        Returns:
        wrap with results
      • activeLearn

        protected MLResults activeLearn()
        Description copied from class: ACoreMLAlgorithm
        Learning method for supervised active core ML algorithm implementations Normally, it is used as a first step to initialize the ML model before going through the active learning process
        Specified by:
        activeLearn in class ACoreMLAlgorithm
        Returns:
        wrap with results
      • activeLearn

        protected MLResults activeLearn​(AMapping oracleMapping)
        Description copied from class: ACoreMLAlgorithm
        Learning method for supervised active core ML algorithm implementations.
        Specified by:
        activeLearn in class ACoreMLAlgorithm
        Parameters:
        oracleMapping - mapping from the oracle
        Returns:
        wrap with results
      • updateScores

        protected void updateScores​(Tree<RefinementNode> r)
        update F-Measure of the refinement tree r based on either training data or PFM
        Parameters:
        r - refinement tree
      • findBestSolution

        public RefinementNode findBestSolution()
        Returns:
        RefinementNode containing the best over all solution
      • getBestKNodes

        protected List<RefinementNode> getBestKNodes​(Tree<RefinementNode> r,
                                                     int k)
        Parameters:
        r - the root of the refinement tree
        k - number of best nodes
        Returns:
        sorted list of best k tree nodes
      • createRefinementTreeRoot

        protected void createRefinementTreeRoot()
        initiate the refinement tree as a root node with set of children nodes containing all initial classifiers