Feat C++ API
A feature engineering automation tool
n_variable.h
Go to the documentation of this file.
1 /* FEAT
2 copyright 2017 William La Cava
3 license: GNU/GPL v3
4 */
5 #ifndef NODE_VARIABLE
6 #define NODE_VARIABLE
7 
8 #include "../node.h"
9 
10 namespace FT{
11 
12 namespace Pop{
13 namespace Op{
14 template <class T>
15 class NodeVariable : public Node
16 {
17  public:
18  size_t loc;
19 
20  NodeVariable(const size_t& l, char ntype = 'f', std::string n="");
21  NodeVariable();
22 
24  void evaluate(const Data& data, State& state);
25 
27  void eval_eqn(State& state);
28 
29  protected:
30  NodeVariable* clone_impl() const override;
31  // rnd_clone is just clone_impl() for variable, since rand vars not supported
32  NodeVariable* rnd_clone_impl() const override;
33 };
34 
35 // serialization
37  visits, loc, variable_name)
39  visits, loc, variable_name)
41  visits, loc, variable_name)
42 } // Op
43 } // Pop
44 } // FT
45 
46 #endif
data holding X, y, and Z data
Definition: data.h:42
size_t loc
column location in X, for x types
Definition: n_variable.h:18
NodeVariable * clone_impl() const override
Definition: n_variable.cc:72
void evaluate(const Data &data, State &state)
Evaluates the node and updates the state states.
Definition: n_variable.cc:37
NodeVariable * rnd_clone_impl() const override
Definition: n_variable.cc:76
void eval_eqn(State &state)
Evaluates the node symbolically.
Definition: n_variable.cc:66
Represents nodes in a program.
Definition: node.h:54
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(NodeFuzzyFixedSplit< float >, name, otype, arity, complexity, visits, train, threshold, threshold_set) NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(NodeFuzzyFixedSplit< int >
main Feat namespace
Definition: data.cc:13
contains various types of State actually used by feat
Definition: state.h:102