public class ExpressionFitnessFunction extends IGPFitnessFunction
DeltaFitnessEvaluator higher fitness values mean the individual
is less fit! ReImplementation on ExcutionEngine
FIXME fix QualityMeasures to work on Mappings!
| Modifier and Type | Field and Description |
|---|---|
protected double |
crossProduct |
static String |
fScore |
protected LinkSpecGeneticLearnerConfig |
m_config |
protected IQualitativeMeasure |
measure |
static String |
precision |
static String |
recall |
protected AMapping |
reference
Fragment of optimal Mapping used during evolution.
|
protected ACache |
sC |
protected ACache |
tC |
protected ACache |
trimmedSourceCache |
protected ACache |
trimmedTargetCache |
| Modifier | Constructor and Description |
|---|---|
protected |
ExpressionFitnessFunction(LinkSpecGeneticLearnerConfig a_config)
Needed for subclasses.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addToReference(AMapping m)
Method to add instances to reference?.
|
double |
calculateRawFitness(org.jgap.gp.IGPProgram p)
Calculates the fitness of the given GPProgram p.
|
double |
calculateRawMeasure(org.jgap.gp.IGPProgram p) |
void |
destroy() |
protected double |
evaluate(org.jgap.gp.IGPProgram a_subject) |
void |
fillCachesIncrementally(AMapping matches) |
static ExpressionFitnessFunction |
getInstance(LinkSpecGeneticLearnerConfig a_config,
IQualitativeMeasure measure,
AMapping reference) |
AMapping |
getMapping(ACache sourceCache,
ACache targetCache,
LinkSpecification spec)
To calculate Mappings based on LS
|
LinkSpecification |
getMetric(org.jgap.gp.IGPProgram p) |
AMapping |
getReferenceMapping() |
ACache |
getSourceCache()
Get full caches used by this learner.
|
ACache |
getTargetCache()
Get full caches used by this learner.
|
void |
setCaches(ACache sC,
ACache tC) |
void |
setReferenceMapping(AMapping referenceData)
As we assume referenceData only holding matches.
|
void |
setUseFullCaches(boolean value)
If we want to use Full Caches instead.
|
void |
trimKnowledgeBases(AMapping trainingData)
Method to scale down caches according to given training data.
|
public static final String fScore
public static final String recall
public static final String precision
protected LinkSpecGeneticLearnerConfig m_config
protected AMapping reference
protected ACache sC
protected ACache tC
protected ACache trimmedSourceCache
protected ACache trimmedTargetCache
protected IQualitativeMeasure measure
protected double crossProduct
protected ExpressionFitnessFunction(LinkSpecGeneticLearnerConfig a_config)
public static ExpressionFitnessFunction getInstance(LinkSpecGeneticLearnerConfig a_config, IQualitativeMeasure measure, AMapping reference)
protected double evaluate(org.jgap.gp.IGPProgram a_subject)
evaluate in class org.jgap.gp.GPFitnessFunctionpublic double calculateRawFitness(org.jgap.gp.IGPProgram p)
p - GPProgram fitness is calculated for.public double calculateRawMeasure(org.jgap.gp.IGPProgram p)
public ACache getSourceCache()
public ACache getTargetCache()
public void destroy()
public AMapping getMapping(ACache sourceCache, ACache targetCache, LinkSpecification spec)
IFitnessFunctionpublic void trimKnowledgeBases(AMapping trainingData)
trainingData - Mapping holding data instances a user has evaluated. That may
include non-matches.public void setUseFullCaches(boolean value)
value - public LinkSpecification getMetric(org.jgap.gp.IGPProgram p)
public AMapping getReferenceMapping()
public void setReferenceMapping(AMapping referenceData)
referenceData - A Mapping holding all matches.public void addToReference(AMapping m)
addToReference in class IGPFitnessFunctionm - Mapping of matches, designated as such by an oracle.public void fillCachesIncrementally(AMapping matches)
fillCachesIncrementally in class IGPFitnessFunctionCopyright © 2020. All rights reserved.