kgp.fitness / BaseMetric

BaseMetric

class BaseMetric : Metric

A base implementation for measuring the fitness of solutions.

Constructors

<init> BaseMetric(name: String, function: FitnessFunction)

A base implementation for measuring the fitness of solutions.

Properties

function val function: FitnessFunction

A fitness function this metric encapsulates.

name val name: String

A name for this metric.

Functions

fitness fun fitness(cases: Cases, outputs: Outputs, programLength: Int): Double

Evaluates the fitness based on a set of cases and a set of outputs.