Class AWombat
- java.lang.Object
-
- org.aksw.limes.core.ml.algorithm.ACoreMLAlgorithm
-
- org.aksw.limes.core.ml.algorithm.wombat.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)
-
-
Field Summary
-
Fields inherited from class org.aksw.limes.core.ml.algorithm.ACoreMLAlgorithm
configuration, learningParameters, sourceCache, targetCache
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAWombat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RefinementNodecreateNode(AMapping mapping, String metricExpr)Create new RefinementNode using either real or pseudo-F-Measureprotected voidfillSampleSourceTargetCaches(AMapping sample)protected List<ExtendedClassifier>findInitialClassifiers()protected doublefMeasure(AMapping predictions)calculate either a real or a pseudo-F-Measureprotected Set<String>getAtomicMeasures()protected <T extends RefinementNode>
Tree<T>getBestNode(Tree<T> root)Get the most promising node as the node with the best F-scoreprotected doublegetBeta()protected doublegetChildrenPenaltyWeight()protected doublegetComplexityPenaltyWeight()protected intgetExcutionTimeInMinutes()protected intgetIterationTimeInMinutes()protected AMappinggetMappingOfMetricExpression(String metricExpression, Tree<? extends RefinementNode> root)Looks first for the input metricExpression in the already constructed tree, if found the corresponding mapping is returned.protected doublegetMaxFitnessThreshold()protected intgetMaxIterationNumber()protected intgetMaxRefinmentTreeSize()protected doublegetMinPropertyCoverage()protected <T extends RefinementNode>
Tree<T>getMostPromisingNode(Tree<T> root)Get the most promising node as the node with the best F-scoreprotected doublegetOverAllPenaltyWeight()protected doublegetPropertyLearningRate()protected voidinit(List<LearningParameter> lp, ACache sourceCache, ACache targetCache)Initialize the core ML algorithm.booleanisUnsupervised()protected booleanisVerbose()protected doubleprecision(AMapping predictions)calculate either a real or a pseudo-Precisionprotected AMappingpredict(ACache source, ACache target, MLResults mlModel)Predict/generate links from source to target based on mlModel.protected doublerecall(AMapping predictions)calculate either a real or a pseudo-Recallprotected booleansaveMapping()voidsetDefaultParameters()Set default ACoreMLAlgorithm parameters values-
Methods inherited from class org.aksw.limes.core.ml.algorithm.ACoreMLAlgorithm
activeLearn, activeLearn, getConfiguration, getName, getNextExamples, getParameter, getParameters, getSourceCache, getTargetCache, learn, learn, setConfiguration, setParameter, supports
-
-
-
-
Field Detail
-
PARAMETER_MAX_REFINEMENT_TREE_SIZE
public static final String PARAMETER_MAX_REFINEMENT_TREE_SIZE
- See Also:
- Constant Field Values
-
PARAMETER_MAX_ITERATIONS_NUMBER
public static final String PARAMETER_MAX_ITERATIONS_NUMBER
- See Also:
- Constant Field Values
-
PARAMETER_MAX_ITERATION_TIME_IN_MINUTES
public static final String PARAMETER_MAX_ITERATION_TIME_IN_MINUTES
- See Also:
- Constant Field Values
-
PARAMETER_EXECUTION_TIME_IN_MINUTES
public static final String PARAMETER_EXECUTION_TIME_IN_MINUTES
- See Also:
- Constant Field Values
-
PARAMETER_MAX_FITNESS_THRESHOLD
public static final String PARAMETER_MAX_FITNESS_THRESHOLD
- See Also:
- Constant Field Values
-
PARAMETER_MIN_PROPERTY_COVERAGE
public static final String PARAMETER_MIN_PROPERTY_COVERAGE
- See Also:
- Constant Field Values
-
PARAMETER_PROPERTY_LEARNING_RATE
public static final String PARAMETER_PROPERTY_LEARNING_RATE
- See Also:
- Constant Field Values
-
PARAMETER_OVERALL_PENALTY_WEIGHT
public static final String PARAMETER_OVERALL_PENALTY_WEIGHT
- See Also:
- Constant Field Values
-
PARAMETER_CHILDREN_PENALTY_WEIGHT
public static final String PARAMETER_CHILDREN_PENALTY_WEIGHT
- See Also:
- Constant Field Values
-
PARAMETER_COMPLEXITY_PENALTY_WEIGHT
public static final String PARAMETER_COMPLEXITY_PENALTY_WEIGHT
- See Also:
- Constant Field Values
-
PARAMETER_VERBOSE
public static final String PARAMETER_VERBOSE
- See Also:
- Constant Field Values
-
PARAMETER_ATOMIC_MEASURES
public static final String PARAMETER_ATOMIC_MEASURES
- See Also:
- Constant Field Values
-
PARAMETER_SAVE_MAPPING
public static final String PARAMETER_SAVE_MAPPING
- See Also:
- Constant Field Values
-
PARAMETER_FMEASURE_BETA
public static final String PARAMETER_FMEASURE_BETA
- See Also:
- Constant Field Values
-
sourceVariable
protected String sourceVariable
-
targetVariable
protected String targetVariable
-
pseudoFMeasure
protected PseudoFMeasure pseudoFMeasure
-
trainingData
protected AMapping trainingData
-
isUnsupervised
protected boolean isUnsupervised
-
sourceSample
protected ACache sourceSample
-
targetSample
protected ACache targetSample
-
-
Method Detail
-
createNode
protected RefinementNode createNode(AMapping mapping, String metricExpr)
Create new RefinementNode using either real or pseudo-F-Measure- Parameters:
mapping- of the nodemetricExpr- 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:ACoreMLAlgorithmPredict/generate links from source to target based on mlModel.- Specified by:
predictin classACoreMLAlgorithm- Parameters:
source- Cachetarget- CachemlModel- result of training phase- Returns:
- the mapping from source to target
-
init
protected void init(List<LearningParameter> lp, ACache sourceCache, ACache targetCache)
Description copied from class:ACoreMLAlgorithmInitialize the core ML algorithm.- Overrides:
initin classACoreMLAlgorithm- Parameters:
lp- learning parameterssourceCache- the source cachetargetCache- the target cache
-
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 RefinementNode> Tree<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 RefinementNode> Tree<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()
-
setDefaultParameters
public void setDefaultParameters()
Description copied from class:ACoreMLAlgorithmSet default ACoreMLAlgorithm parameters values- Specified by:
setDefaultParametersin classACoreMLAlgorithm
-
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()
-
-