12 #include <Eigen/Dense>
13 #include "../../init.h"
14 #include "../../dat/state.h"
15 #include "../../dat/data.h"
16 #include "../../util/rnd.h"
17 #include "../../util/error.h"
18 #include "../../util/utils.h"
22 using Eigen::MatrixXf;
23 using Eigen::VectorXf;
25 typedef Eigen::Array<bool,Eigen::Dynamic,1>
ArrayXb;
26 #define MAX_FLT std::numeric_limits<float>::max()
27 #define MIN_FLT std::numeric_limits<float>::lowest()
29 #define MAX_INT std::numeric_limits<int>::max()
30 #define MIN_INT std::numeric_limits<int>::lowest()
33 #include "../cuda-op/kernels.h"
59 std::map<char, unsigned int>
arity;
74 unsigned int total_arity();
77 ArrayXf limited(ArrayXf x);
80 void eval_complexity(map<
char, vector<unsigned int>>& cstate);
83 void eval_complexity_db(map<
char, vector<string>>& cstate);
90 std::unique_ptr<Node> clone()
const;
93 std::unique_ptr<Node> rnd_clone()
const;
data holding X, y, and Z data
Represents nodes in a program.
virtual Node * clone_impl() const =0
virtual void eval_eqn(State &state)=0
evaluates the node symbolically
std::map< char, unsigned int > arity
arity of the operator
virtual void evaluate(const Data &data, State &state)=0
Evaluates the node and updates the state states.
virtual Node * rnd_clone_impl() const =0
virtual bool isNodeTrain()
virtual bool isNodeDx()
check of node type
string variable_name
variable name, if any
int complexity
complexity of node
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Log_Stats, generation, time, min_loss, min_loss_v, med_loss, med_loss_v, med_size, med_complexity, med_num_params, med_dim)
Eigen::Array< bool, Eigen::Dynamic, 1 > ArrayXb
contains various types of State actually used by feat