kgp.fitness / Metric

Metric

interface Metric

Provides a way of measuring the fitness of a set of outputs.

Properties

function abstract val function: FitnessFunction

A fitness function this metric encapsulates.

name abstract val name: String

A name for this metric.

Functions

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

Evaluates the fitness using this metrics fitness function.

Inheritors

BaseMetric class BaseMetric : Metric

A base implementation for measuring the fitness of solutions.

ParsimonyAwareMetric class ParsimonyAwareMetric : Metric

Provides a way of measuring the fitness of a set of outputs with a penalty for parsimony pressure.