Ultra 0.9.4
Loading...
Searching...
No Matches
ultra::src::ExampleEvaluator Concept Reference

#include <evaluator.h>

Concept definition

template<class F, class D, class P>
&& std::invocable<F, internal::dataset_example_t<D>>
&& std::convertible_to<std::invoke_result_t<F, internal::dataset_example_t<D>>,
std::optional<double>>
Definition individual.h:93
Definition gp/src/evaluator.h:43
Definition gp/src/evaluator.h:69

Detailed Description

Concept modelling a functor that evaluates a single dataset example.

An ExampleEvaluator is a callable object that takes one example from a dataset and returns a value representing its contribution to the overall evaluation.

The returned value can represent:

  • an error (lower is better);
  • a score or reward (higher is better).

This concept is intentionally agnostic with respect to the interpretation of the returned value. The aggregation semantics are defined by the evaluator using the functor (e.g. sum vs average, error vs score).

Accepts both functors returning std::optional<double> and functors returning double.

Note
The functor is typically constructed from an individual/program and may internally use an oracle or interpreter to compute predictions.