Individual performing function finding tasks It is used used for symbolic regression tasks, polynomial finding, etc. It holds _hits value, which is a summary of accuracy of the individual. During evaluation, chromosome value is compared with the target. More...
#include <Individual.h>


Public Member Functions | |
| FunctionIndividual () | |
| FunctionIndividual (const FunctionIndividual &) | |
| virtual | ~FunctionIndividual () |
| void | evaluate (const double &user_param=0.0, const size_t pop_age=0) |
| ret_type | calculateFitness (const size_t pop_age=0) |
| void | reset () |
| std::string | toString () const |
Static Public Member Functions | |
| static double | getSelectionRange () |
| static double | getPrecision () |
| static void | setPrecision (double fprec) |
| static void | setSelectionRange (double fr) |
Private Attributes | |
| double | _hits |
Static Private Attributes | |
| static double | _precision = 0.01 |
| static double | _R = 10 |
Individual performing function finding tasks It is used used for symbolic regression tasks, polynomial finding, etc. It holds _hits value, which is a summary of accuracy of the individual. During evaluation, chromosome value is compared with the target.
| GEP::FunctionIndividual::FunctionIndividual | ( | ) |
Default constructor
| GEP::FunctionIndividual::FunctionIndividual | ( | const FunctionIndividual & | copy | ) |
Copy constructor
| virtual GEP::FunctionIndividual::~FunctionIndividual | ( | ) | [inline, virtual] |
Default destructor
| double GEP::FunctionIndividual::calculateFitness | ( | const size_t | pop_age = 0 |
) | [virtual] |
Simply assigns _hits to _fitness. Maximum fitness = _R*_encounters
Reimplemented from GEP::Individual< double, double >.
| void GEP::FunctionIndividual::evaluate | ( | const double & | user_param = 0.0, |
|
| const size_t | pop_age = 0 | |||
| ) | [virtual] |
Evaluation of an Individual, typical for the inheriting class.
Reimplemented from GEP::Individual< double, double >.
| static double GEP::FunctionIndividual::getPrecision | ( | ) | [inline, static] |
| static double GEP::FunctionIndividual::getSelectionRange | ( | ) | [inline, static] |
return _R. Calculate max fitness as follows:
max_fitness = number_of_evaluations * _R;
| void GEP::FunctionIndividual::reset | ( | ) | [inline, virtual] |
Resets values used for fitness calculation.
Reimplemented from GEP::Individual< double, double >.
| static void GEP::FunctionIndividual::setPrecision | ( | double | fprec | ) | [inline, static] |
| static void GEP::FunctionIndividual::setSelectionRange | ( | double | fr | ) | [inline, static] |
| std::string GEP::FunctionIndividual::toString | ( | ) | const [inline, virtual] |
Reimplemented from GEP::Individual< double, double >.
double GEP::FunctionIndividual::_hits [private] |
Encounters while aproximation.
double GEP::FunctionIndividual::_precision = 0.01 [static, private] |
Desired precision of approximation
double GEP::FunctionIndividual::_R = 10 [static, private] |
Selection range (do not confuse with the selection operator). This value describes overall contribution of this approximation.
1.6.1