Ultra 0.9.4
Loading...
Searching...
No Matches
ultra::src::mae_error_functor< P > Class Template Reference

#include <evaluator.h>

Public Member Functions

 mae_error_functor (const P &)
std::optional< double > operator() (const example &) const

Detailed Description

template<Individual P>
class ultra::src::mae_error_functor< P >

Mean absolute error functor for evaluating a program on a single example.

Template Parameters
Pindividual type

The functor owns an oracle initialised from the program and computes a scalar error value for each training example.

Computes ( $\frac{1}{n} \sum_{i=1}^n |target_i - actual_i|$).

See also
mae_evaluator

Member Function Documentation

◆ operator()()

template<Individual P>
std::optional< double > mae_error_functor::operator() ( const example & example) const
nodiscard
Parameters
[in]examplecurrent training case
Returns
a measurement of the error of the model/program on the given training case (value in the [0;+inf[ range)

The documentation for this class was generated from the following files: