Class PseudoFMeasureFitnessFunction
- java.lang.Object
-
- org.jgap.gp.GPFitnessFunction
-
- org.aksw.limes.core.ml.algorithm.eagle.core.IGPFitnessFunction
-
- org.aksw.limes.core.ml.algorithm.eagle.core.PseudoFMeasureFitnessFunction
-
- All Implemented Interfaces:
Serializable,IFitnessFunction
public class PseudoFMeasureFitnessFunction extends IGPFitnessFunction
Fitness function to evolve metric expression using a PseudoMeasue- Version:
- Jul 21, 2016
- Author:
- Klaus Lyko (lyko@informatik.uni-leipzig.de), Tommaso Soru (tsoru@informatik.uni-leipzig.de), Mohamed Sherif (sherif@informatik.uni-leipzig.de)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ExecutionEngineengine
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddToReference(AMapping m)AMappingcalculateMapping(org.jgap.gp.IGPProgram p)DoublecalculatePseudoMeasure(org.jgap.gp.IGPProgram p)doublecalculateRawFitness(org.jgap.gp.IGPProgram p)Determine fitness of the individual p;doublecalculateRawMeasure(org.jgap.gp.IGPProgram p)voiddestroy()Needed between several runsprotected doubleevaluate(org.jgap.gp.IGPProgram program)voidfillCachesIncrementally(AMapping matches)doublegetBeta()static PseudoFMeasureFitnessFunctiongetInstance(LinkSpecGeneticLearnerConfig a_config, PseudoFMeasure pfm, ACache c1, ACache c2)Singleton patternAMappinggetMapping(ACache sC, ACache tC, LinkSpecification spec)Get or create a mapping from a link specification (Metric String + Acceptance threshold: 0<=threshold<=1).PseudoFMeasuregetMeasure()voidsetBeta(double beta)voidsetMeasure(PseudoFMeasure pfm)
-
-
-
Field Detail
-
engine
public ExecutionEngine engine
-
-
Method Detail
-
getInstance
public static PseudoFMeasureFitnessFunction getInstance(LinkSpecGeneticLearnerConfig a_config, PseudoFMeasure pfm, ACache c1, ACache c2)
Singleton pattern- Parameters:
a_config- LinkSpecGeneticLearnerConfigpfm- PseudoFMeasurec1- Cachec2- Cache- Returns:
- instance of PseudoFMeasure Fitness Function
-
evaluate
protected double evaluate(org.jgap.gp.IGPProgram program)
- Specified by:
evaluatein classorg.jgap.gp.GPFitnessFunction
-
calculateRawFitness
public double calculateRawFitness(org.jgap.gp.IGPProgram p)
Determine fitness of the individual p;- Parameters:
p- GP programs- Returns:
- 1-PseudoFMeasure. Or if something wents wrong either 5d, iff p isn't fulfilling all constraints. 8d if executing p results in memory error.
-
calculateMapping
public AMapping calculateMapping(org.jgap.gp.IGPProgram p)
-
calculatePseudoMeasure
public Double calculatePseudoMeasure(org.jgap.gp.IGPProgram p)
- Parameters:
p- GP programs- Returns:
- PseudoMeasure
-
getMapping
public AMapping getMapping(ACache sC, ACache tC, LinkSpecification spec)
Get or create a mapping from a link specification (Metric String + Acceptance threshold: 0<=threshold<=1).- Parameters:
spec- the link specification- Returns:
- Mapping m={sURI, tURI} of all pairs who satisfy the metric.
-
destroy
public void destroy()
Needed between several runs
-
getMeasure
public PseudoFMeasure getMeasure()
-
setMeasure
public void setMeasure(PseudoFMeasure pfm)
-
getBeta
public double getBeta()
-
setBeta
public void setBeta(double beta)
-
calculateRawMeasure
public double calculateRawMeasure(org.jgap.gp.IGPProgram p)
-
addToReference
public void addToReference(AMapping m)
- Specified by:
addToReferencein classIGPFitnessFunction
-
fillCachesIncrementally
public void fillCachesIncrementally(AMapping matches)
- Specified by:
fillCachesIncrementallyin classIGPFitnessFunction
-
-