ECF 1.5
SymbRegEvalOp.h
1#ifndef ECF_CARTESIAN_SYMBREGEVALOP_H
2#define ECF_CARTESIAN_SYMBREGEVALOP_H
3#include <ECF.h>
4#include <EvaluateOp.h>
5#include <ECF_macro.h>
6#include "utility/expression_evaluation.h"
7#include "utility/measures.h"
8#include "utility/fileparser.h"
9#include <iostream>
10#include <fstream>
11#include <istream>
12#include <sstream>
13class SymbRegEvalOp : public EvaluateOp
14{
15private:
16 std::vector<std::vector<double> > inputs;
17 std::vector<double> output;
18 std::vector<double> kappaOutput;
19 std::vector<double> thetaOutput;
20 std::string equation;
21 double softTargetBeta;
22 double softTargetGamma;
23 bool softTarget;
24 void addConstants(uint nConstants);
25public:
26 SymbRegEvalOp(){softTarget = false;};
27 void registerParameters(StateP stateP);
28 bool initialize(StateP stateP);
29 FitnessP evaluate(IndividualP individual);
30};
31#endif //ECF_CARTESIAN_SYMBREGEVALOP_H
Evaluation base class.
Definition: EvaluateOp.h:17
Symbolic regression evaluation operator (using AP genotype).
Definition: SymbRegEvalOp.h:29
FitnessP evaluate(IndividualP individual)
Evaluate a single individual. Method must create and return a Fitness object.
bool initialize(StateP stateP)
Initialize the evaluator. Called before first evaluation occurs.
void registerParameters(StateP stateP)
Register evaluator parameters. Called before EvaluateOp::initialize method.