Vita
Public Member Functions | List of all members
vita::evaluator< T > Class Template Referenceabstract

Calculates the fitness of an individual. More...

#include <evaluator.h>

Inherits vita::cached_evaluator.

Inherited by vita::src_evaluator< T, dataframe >, vita::constrained_evaluator< T, E, P >, vita::evaluator_proxy< T, E >, vita::ga_evaluator< T, F >, vita::src_evaluator< T, DAT >, and vita::test_evaluator< T >.

Public Member Functions

virtual fitness_t fast (const T &)
 
virtual std::unique_ptr< basic_lambda_flambdify (const T &) const
 
virtual bool load (std::istream &)
 
virtual fitness_t operator() (const T &)=0
 
virtual bool save (std::ostream &) const
 
- Public Member Functions inherited from vita::cached_evaluator
virtual void clear ()
 Clear possible cached values. More...
 

Detailed Description

template<class T>
class vita::evaluator< T >

Calculates the fitness of an individual.

Template Parameters
Tthe type of individual used

evaluator class calculates the fitness of an individual (how good he is). This is an abstract class because the fitness is domain dependent (symbolic regression, data classification, automation...).

AKA fitness function.

Note
Our convention is to convert raw fitness to standardized fitness. The requirements for standardized fitness are:
  • bigger values represent better choices;
  • (useful but not mandatory) optimal value is 0.
Warning
This class shouldn't be confused with the vita::interpreter class (that calculates the output of an individual given an input vector).
Examples
example6.cc.

Definition at line 53 of file evaluator.h.

Member Function Documentation

◆ operator()()

template<class T >
virtual fitness_t vita::evaluator< T >::operator() ( const T &  )
pure virtual

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