Class LinkSpecGeneticLearnerConfig

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable, org.jgap.data.config.Configurable, org.jgap.util.ICloneable

    public class LinkSpecGeneticLearnerConfig
    extends org.jgap.gp.impl.GPConfiguration
    Configure JGAP evolutionary process to be used by genetic link specification leaner.
    Version:
    Jul 21, 2016
    Author:
    Klaus Lyko, Mohamed Sherif (sherif@informatik.uni-leipzig.de)
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      ACache sC  
      KBInfo source  
      KBInfo target  
      ACache tC  
      • Fields inherited from class org.jgap.Configuration

        PROPERTY_BFITFNC_INST, PROPERTY_EVENT_MGR_INST, PROPERTY_FITEVAL_INST, PROPERTY_FITFUNC_INST, PROPERTY_JGAPFACTORY_CLASS, PROPERTY_SAMPLE_CHROM_INST, S_CHROMOSOME_SIZE, S_CONFIGURATION, S_CONFIGURATION_HANDLER, S_CONFIGURATION_NAME, S_EVENT_MANAGER, S_FITNESS_EVALUATOR, S_FITNESS_FUNCTION, S_GENETIC_OPERATORS, S_MINPOPSIZE, S_NATURAL_SELECTORS, S_NONE, S_POPULATION_SIZE, S_POST, S_PRE, S_RANDOM_GENERATOR, S_SAMPLE_CHROM, S_SIZE, S_TOSTRING
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      String getExpressionProperty​(String discriminant, int id)
      Function to retrieve properties of the Linked Data sources dubbed source and target completed with the specified variable of the knowledge base to comply with the limes dtd.
      String getExpressionProperty​(String discriminant, String propName)  
      PropertyMapping getPropertyMapping()  
      String getPropertyName​(String discriminant, int id)
      Little helper function to retrieve plane property names.
      boolean hasDateProperties()
      Do we have to consider date properties?
      boolean hasNumericProperties()
      Do we have to consider numeric properties?
      boolean hasPointSetProperties()
      Do we have to consider pointset properties?
      boolean isPropertyMatch​(int sourceIndex, int targetIndex)  
      protected boolean redundantCommands()
      In case we don't want to.
      void setPropertyMapping​(PropertyMapping propMap)  
      • Methods inherited from class org.jgap.gp.impl.GPConfiguration

        addGeneticOperator, clearMemory, clearStack, clone, compareTo, createMatrix, equals, flagMaxNodeWarningPrinted, getCrossMethod, getCrossoverProb, getDynamizeArityProb, getFunctionProb, getGPFitnessEvaluator, getGPFitnessFunction, getInitStrategy, getJGAPFactory, getMatrix, getMaxCrossoverDepth, getMaxInitDepth, getMemorySize, getMinInitDepth, getMutationProb, getNewChromsPercent, getNodeValidator, getProgramCreationMaxtries, getPrototypeProgram, getReproductionProb, getSelectionMethod, getVariable, init, isMaxNodeWarningPrinted, isNoCommandGeneCloning, isStrictProgramCreation, isUseProgramCache, isVerifyPrograms, newInstanceGP, peekStack, popFromStack, pushToStack, putToProgramCache, putVariable, readFromMemory, readFromMemoryIfExists, readIndexedMemory, readMatrix, readMatrixMemory, readProgramCache, resetMatrix, setCrossoverMethod, setCrossoverProb, setDynamizeArityProb, setFitnessEvaluator, setFitnessFunction, setFunctionProb, setGPFitnessEvaluator, setInitStrategy, setMatrix, setMaxCrossoverDepth, setMaxInitDepth, setMinInitDepth, setMutationProb, setNewChromsPercent, setNoCommandGeneCloning, setNodeValidator, setProgramCreationMaxTries, setPrototypeProgram, setReproductionProb, setSelectionMethod, setStrictProgramCreation, setUseProgramCache, setVerifyPrograms, stackSize, storeIndexedMemory, storeInMemory, storeMatrixMemory, validateNode, verifyStateIsValid
      • Methods inherited from class org.jgap.Configuration

        addNaturalSelector, checkProperty, doClone, getBreeder, getBulkFitnessFunction, getChromosomePool, getChromosomeSize, getConfigurationHandler, getEventManager, getFitnessEvaluator, getFitnessFunction, getGenerationNr, getGeneticOperators, getId, getMinimumPopSizePercent, getName, getNaturalSelector, getNaturalSelector, getNaturalSelectors, getNaturalSelectorsSize, getPopulationSize, getRandomGenerator, getSampleChromosome, getSelectFromPrevGen, getThreadKey, incrementGenerationNr, isAlwaysCalculateFitness, isKeepPopulationSizeConstant, isLocked, isPreserveFittestIndividual, lockSettings, makeKey, makeThreadKey, newInstance, removeNaturalSelectors, reset, reset, resetProperty, resetProperty, setAlwaysCaculateFitness, setBreeder, setBulkFitnessFunction, setChromosomePool, setEventManager, setFitnessEvaluator, setFitnessFunction, setId, setJGAPFactory, setKeepPopulationSizeConstant, setMinimumPopSizePercent, setName, setNaturalSelector, setPopulationSize, setPreservFittestIndividual, setRandomGenerator, setSampleChromosome, setSelectFromPrevGen, toString, verifyChangesAllowed
    • Constructor Detail

      • LinkSpecGeneticLearnerConfig

        public LinkSpecGeneticLearnerConfig​(KBInfo KBIsource,
                                            KBInfo KBItarget,
                                            PropertyMapping propMapping)
                                     throws org.jgap.InvalidConfigurationException
        Constructor.
        Parameters:
        KBIsource - Specifies the source knowledge base.
        KBItarget - Specifies the target knowledge base.
        propMapping - A Mapping of Properties of both source and target.
        Throws:
        org.jgap.InvalidConfigurationException - when an invalid value has been passed to a Configuration object
    • Method Detail

      • getPropertyName

        public String getPropertyName​(String discriminant,
                                      int id)
        Little helper function to retrieve plane property names.
        Parameters:
        id - Number of the property in the property List.
        discriminant - String to differ between the two Linked Data Sources dubbed "source" and "target".
        Returns:
        name of the property with the given number.
      • getExpressionProperty

        public String getExpressionProperty​(String discriminant,
                                            int id)
        Function to retrieve properties of the Linked Data sources dubbed source and target completed with the specified variable of the knowledge base to comply with the limes dtd. Variables have in most cases the form "?x", properties are the names of the property possibly starting with a namespace, e.g. "dc:title". But for a metric expression we have to combine both without the question mark: E.g. "x.dc:title".
        Parameters:
        discriminant - String "source" or "target" to differ between the both knowledge bases.
        id - Number of the property in the properties list in the according KBInfo.
        Returns:
        Combined String of variable and property.
      • getExpressionProperty

        public String getExpressionProperty​(String discriminant,
                                            String propName)
      • hasNumericProperties

        public boolean hasNumericProperties()
        Do we have to consider numeric properties?
        Returns:
        True if the given PropertyMapping consists of a mapping of two numeric properties.
      • hasDateProperties

        public boolean hasDateProperties()
        Do we have to consider date properties?
        Returns:
        true iff the given PropertyMapping states a mapping between two date propeties.
      • hasPointSetProperties

        public boolean hasPointSetProperties()
        Do we have to consider pointset properties?
        Returns:
        true iff the given PropertyMapping states a mapping between two date propeties.
      • redundantCommands

        protected boolean redundantCommands()
        In case we don't want to.
        Returns:
      • isPropertyMatch

        public boolean isPropertyMatch​(int sourceIndex,
                                       int targetIndex)
      • setPropertyMapping

        public void setPropertyMapping​(PropertyMapping propMap)