Class ACoreMLAlgorithm

    • Field Detail

      • logger

        protected static org.slf4j.Logger logger
      • sourceCache

        protected ACache sourceCache
      • targetCache

        protected ACache targetCache
    • Constructor Detail

      • ACoreMLAlgorithm

        public ACoreMLAlgorithm()
    • Method Detail

      • getConfiguration

        public Configuration getConfiguration()
        Returns:
        the configuration
      • setConfiguration

        public void setConfiguration​(Configuration configuration)
        Parameters:
        configuration - the configuration
      • getName

        protected abstract String getName()
        Name of the core ML algorithm.
        Returns:
        Name of the core ML algorithm.
      • getParameters

        protected List<LearningParameter> getParameters()
        Returns:
        current core ML algorithm parameters and their default values
      • setDefaultParameters

        public abstract void setDefaultParameters()
        Set default ACoreMLAlgorithm parameters values
      • init

        protected void init​(List<LearningParameter> learningParameters,
                            ACache sourceCache,
                            ACache targetCache)
        Initialize the core ML algorithm.
        Parameters:
        learningParameters - learning parameters
        sourceCache - the source cache
        targetCache - the target cache
      • predict

        protected abstract AMapping predict​(ACache source,
                                            ACache target,
                                            MLResults mlModel)
        Predict/generate links from source to target based on mlModel.
        Parameters:
        source - Cache
        target - Cache
        mlModel - result of training phase
        Returns:
        the mapping from source to target
      • supports

        protected abstract boolean supports​(MLImplementationType mlType)
        Check whether the mlType is supported.
        Parameters:
        mlType - machine learning implementation type
        Returns:
        a boolean value
      • getParameter

        protected Object getParameter​(String name)
        Get parameter by name.
        Parameters:
        name - parameter name
        Returns:
        the parameter as Object
        Throws:
        NoSuchParameterException - if parameter is not exists
      • setParameter

        public void setParameter​(String par,
                                 Object val)
        Parameters:
        par - parameter name
        val - parameter value
      • getSourceCache

        public ACache getSourceCache()
        Returns:
        the source cache
      • getTargetCache

        public ACache getTargetCache()
        Returns:
        the target cache