Package org.aksw.limes.core.ml.algorithm
Class WombatComplete
- java.lang.Object
-
- org.aksw.limes.core.ml.algorithm.ACoreMLAlgorithm
-
- org.aksw.limes.core.ml.algorithm.wombat.AWombat
-
- org.aksw.limes.core.ml.algorithm.WombatComplete
-
public class WombatComplete extends AWombat
The complete Wombat algorithm (slow implementation)- Version:
- Jul 15, 2016
- Author:
- Mohamed Sherif (sherif@informatik.uni-leipzig.de)
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringALGORITHM_NAMEprotected ExtendedRefinementNodebestSolutionNodeprotected List<ExtendedClassifier>classifiersprotected Map<String,AMapping>diffsprotected intiterationNrprotected static org.slf4j.Loggerloggerprotected intpruneNodeCountprotected longpruningTimeprotected static booleanusePruning-
Fields inherited from class org.aksw.limes.core.ml.algorithm.wombat.AWombat
isUnsupervised, PARAMETER_ATOMIC_MEASURES, PARAMETER_CHILDREN_PENALTY_WEIGHT, PARAMETER_COMPLEXITY_PENALTY_WEIGHT, PARAMETER_EXECUTION_TIME_IN_MINUTES, PARAMETER_FMEASURE_BETA, PARAMETER_MAX_FITNESS_THRESHOLD, PARAMETER_MAX_ITERATION_TIME_IN_MINUTES, PARAMETER_MAX_ITERATIONS_NUMBER, PARAMETER_MAX_REFINEMENT_TREE_SIZE, PARAMETER_MIN_PROPERTY_COVERAGE, PARAMETER_OVERALL_PENALTY_WEIGHT, PARAMETER_PROPERTY_LEARNING_RATE, PARAMETER_SAVE_MAPPING, PARAMETER_VERBOSE, pseudoFMeasure, sourcePropertiesCoverageMap, sourceSample, sourceUris, sourceVariable, targetPropertiesCoverageMap, targetSample, targetUris, targetVariable, trainingData, wombatParameterNames
-
Fields inherited from class org.aksw.limes.core.ml.algorithm.ACoreMLAlgorithm
configuration, learningParameters, sourceCache, targetCache
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedWombatComplete()WombatComplete constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MLResultsactiveLearn()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 processprotected MLResultsactiveLearn(AMapping oracleMapping)Learning method for supervised active core ML algorithm implementations.protected ExtendedRefinementNodecreateNode(String metricExpr)protected ExtendedRefinementNodecreateNode(AMapping mapping, String metricExpr)Create new ExtendedRefinementNode using either real or pseudo-F-MeasureExtendedRefinementNodefindBestSolution()protected StringgetName()Name of the core ML algorithm.protected AMappinggetNextExamples(int size)Get a set of examples to be added to the mapping.protected voidinit(List<LearningParameter> lp, ACache sourceCache, ACache targetCache)Initialize the core ML algorithm.protected MLResultslearn(PseudoFMeasure pfm)Learning method for unsupervised core ML algorithm implementations.MLResultslearn(AMapping trainingData)Learning method for supervised core ML algorithm implementations, where the confidence values for each pair in the trainingData determine its truth degree.protected booleansupports(MLImplementationType mlType)Check whether the mlType is supported.-
Methods inherited from class org.aksw.limes.core.ml.algorithm.wombat.AWombat
fillSampleSourceTargetCaches, findInitialClassifiers, fMeasure, getAtomicMeasures, getBestNode, getBeta, getChildrenPenaltyWeight, getComplexityPenaltyWeight, getExcutionTimeInMinutes, getIterationTimeInMinutes, getMappingOfMetricExpression, getMaxFitnessThreshold, getMaxIterationNumber, getMaxRefinmentTreeSize, getMinPropertyCoverage, getMostPromisingNode, getOverAllPenaltyWeight, getPropertyLearningRate, isUnsupervised, isVerbose, precision, predict, recall, saveMapping, setDefaultParameters
-
Methods inherited from class org.aksw.limes.core.ml.algorithm.ACoreMLAlgorithm
getConfiguration, getParameter, getParameters, getSourceCache, getTargetCache, setConfiguration, setParameter
-
-
-
-
Field Detail
-
ALGORITHM_NAME
protected static final String ALGORITHM_NAME
- See Also:
- Constant Field Values
-
logger
protected static org.slf4j.Logger logger
-
usePruning
protected static boolean usePruning
-
bestSolutionNode
protected ExtendedRefinementNode bestSolutionNode
-
classifiers
protected List<ExtendedClassifier> classifiers
-
iterationNr
protected int iterationNr
-
pruneNodeCount
protected int pruneNodeCount
-
pruningTime
protected long pruningTime
-
-
Method Detail
-
getName
protected String getName()
Description copied from class:ACoreMLAlgorithmName of the core ML algorithm.- Specified by:
getNamein classACoreMLAlgorithm- Returns:
- Name of the core ML algorithm.
-
init
protected void init(List<LearningParameter> lp, ACache sourceCache, ACache targetCache)
Description copied from class:ACoreMLAlgorithmInitialize the core ML algorithm.
-
learn
public MLResults learn(AMapping trainingData)
Description copied from class:ACoreMLAlgorithmLearning method for supervised core ML algorithm implementations, where the confidence values for each pair in the trainingData determine its truth degree.- Specified by:
learnin classACoreMLAlgorithm- Parameters:
trainingData- used for learning- Returns:
- wrap with results
-
learn
protected MLResults learn(PseudoFMeasure pfm)
Description copied from class:ACoreMLAlgorithmLearning method for unsupervised core ML algorithm implementations.- Specified by:
learnin classACoreMLAlgorithm- Parameters:
pfm- pseudo F-measure for unsupervised learning- Returns:
- wrap with results
-
supports
protected boolean supports(MLImplementationType mlType)
Description copied from class:ACoreMLAlgorithmCheck whether the mlType is supported.- Specified by:
supportsin classACoreMLAlgorithm- Parameters:
mlType- machine learning implementation type- Returns:
- a boolean value
-
getNextExamples
protected AMapping getNextExamples(int size) throws UnsupportedMLImplementationException
Description copied from class:ACoreMLAlgorithmGet a set of examples to be added to the mapping.- Specified by:
getNextExamplesin classACoreMLAlgorithm- Parameters:
size- of the examples- Returns:
- the mapping
- Throws:
UnsupportedMLImplementationException- Exception
-
activeLearn
protected MLResults activeLearn(AMapping oracleMapping) throws UnsupportedMLImplementationException
Description copied from class:ACoreMLAlgorithmLearning method for supervised active core ML algorithm implementations.- Specified by:
activeLearnin classACoreMLAlgorithm- Parameters:
oracleMapping- mapping from the oracle- Returns:
- wrap with results
- Throws:
UnsupportedMLImplementationException- if ML implementation is not supported
-
findBestSolution
public ExtendedRefinementNode findBestSolution()
- Returns:
- ExtendedRefinementNode containing the best over all solution
-
activeLearn
protected MLResults activeLearn() throws UnsupportedMLImplementationException
Description copied from class:ACoreMLAlgorithmLearning 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:
activeLearnin classACoreMLAlgorithm- Returns:
- wrap with results
- Throws:
UnsupportedMLImplementationException- if ML implementation is not supported
-
createNode
protected ExtendedRefinementNode createNode(String metricExpr)
- Parameters:
metricExpr- learning specifications- Returns:
- new ExtendedRefinementNode
-
createNode
protected ExtendedRefinementNode createNode(AMapping mapping, String metricExpr)
Create new ExtendedRefinementNode using either real or pseudo-F-Measure- Overrides:
createNodein classAWombat- Parameters:
mapping- of the nodemetricExpr- learning specifications- Returns:
- new ExtendedRefinementNode
-
-