ontolearn.fitness_functions

Fitness functions.

Classes

LinearPressureFitness

Linear parametric parsimony pressure.

Module Contents

class ontolearn.fitness_functions.LinearPressureFitness(gain: float = 2048.0, penalty: float = 1.0)[source]

Bases: ontolearn.abstracts.AbstractFitness

Linear parametric parsimony pressure.

__slots__ = ('gain', 'penalty')
name: Final = 'Linear_Pressure_Fitness'
gain
penalty
apply(individual: ontolearn.ea_utils.Tree)[source]

Apply the fitness function on an individual and set its fitness attribute to the calculated value.

Parameters:

individual – Individual to set the fitness on.