Feat C++ API
A feature engineering automation tool
nodemap.h
Go to the documentation of this file.
1
/* FEAT
2
copyright 2017 William La Cava
3
license: GNU/GPL v3
4
*/
5
#ifndef NODEMAP
6
#define NODEMAP
7
8
#include "
nodewrapper.h
"
9
10
namespace
FT
{
11
namespace
Pop{
12
namespace
Op{
13
14
struct
NodeMap
15
{
16
std::map<std::string, Node*>
node_map
;
17
18
NodeMap
()
19
{
20
this->node_map = {
21
//arithmetic operators
22
{
"+"
,
new
NodeAdd
({1.0,1.0})},
23
{
"-"
,
new
NodeSubtract
({1.0,1.0})},
24
{
"*"
,
new
NodeMultiply
({1.0,1.0})},
25
{
"/"
,
new
NodeDivide
({1.0,1.0})},
26
{
"sqrt"
,
new
NodeSqrt
({1.0})},
27
{
"sin"
,
new
NodeSin
({1.0})},
28
{
"cos"
,
new
NodeCos
({1.0})},
29
{
"tanh"
,
new
NodeTanh
({1.0})},
30
{
"^2"
,
new
NodeSquare
({1.0})},
31
{
"^3"
,
new
NodeCube
({1.0})},
32
{
"^"
,
new
NodeExponent
({1.0})},
33
{
"exp"
,
new
NodeExponential
({1.0})},
34
{
"gauss"
,
new
NodeGaussian
({1.0})},
35
{
"gauss2d"
,
new
Node2dGaussian
({1.0, 1.0})},
36
{
"log"
,
new
NodeLog
({1.0}) },
37
{
"logit"
,
new
NodeLogit
({1.0}) },
38
{
"relu"
,
new
NodeRelu
({1.0}) },
39
{
"b2f"
,
new
NodeFloat<bool>
() },
40
{
"c2f"
,
new
NodeFloat<int>
() },
41
42
// logical operators
43
{
"and"
,
new
NodeAnd
() },
44
{
"or"
,
new
NodeOr
() },
45
{
"not"
,
new
NodeNot
() },
46
{
"xor"
,
new
NodeXor
() },
47
{
"="
,
new
NodeEqual
() },
48
{
">"
,
new
NodeGreaterThan
() },
49
{
">="
,
new
NodeGEQ
() },
50
{
"<"
,
new
NodeLessThan
() },
51
{
"<="
,
new
NodeLEQ
() },
52
{
"split"
,
new
NodeSplit<float>
() },
53
{
"fuzzy_split"
,
new
NodeFuzzySplit<float>
() },
54
{
"fuzzy_fixed_split"
,
new
NodeFuzzyFixedSplit<float>
() },
55
{
"split_c"
,
new
NodeSplit<int>
() },
56
{
"fuzzy_split_c"
,
new
NodeFuzzySplit<int>
() },
57
{
"fuzzy_fixed_split_c"
,
new
NodeFuzzyFixedSplit<int>
() },
58
{
"if"
,
new
NodeIf
() },
59
{
"ite"
,
new
NodeIfThenElse
() },
60
{
"step"
,
new
NodeStep
() },
61
{
"sign"
,
new
NodeSign
() },
62
63
// longitudinal nodes
64
{
"mean"
,
new
NodeMean
() },
65
{
"median"
,
new
NodeMedian
() },
66
{
"max"
,
new
NodeMax
() },
67
{
"min"
,
new
NodeMin
() },
68
{
"variance"
,
new
NodeVar
() },
69
{
"skew"
,
new
NodeSkew
() },
70
{
"kurtosis"
,
new
NodeKurtosis
() },
71
{
"slope"
,
new
NodeSlope
() },
72
{
"count"
,
new
NodeCount
() },
73
{
"recent"
,
new
NodeRecent
() },
74
// terminals
75
{
"variable_f"
,
new
NodeVariable<float>
() },
76
{
"variable_b"
,
new
NodeVariable<bool>
() },
77
{
"variable_c"
,
new
NodeVariable<int>
() },
78
{
"constant_b"
,
new
NodeConstant
(
false
) },
79
{
"constant_d"
,
new
NodeConstant
(0.0) },
80
};
81
};
82
83
~NodeMap
()
84
{
85
for
(
auto
it =
node_map
.cbegin(); it !=
node_map
.cend(); )
86
{
87
delete
it->second;
88
node_map
.erase(it++);
// or "it = m.erase(it)" since C++11
89
}
90
};
91
92
};
93
static
NodeMap
NM
;
94
}}}
95
#endif
FT::Pop::Op::Node2dGaussian
Definition:
n_2dgaussian.h:17
FT::Pop::Op::NodeAdd
Definition:
n_add.h:15
FT::Pop::Op::NodeAnd
Definition:
n_and.h:15
FT::Pop::Op::NodeConstant
Definition:
n_constant.h:15
FT::Pop::Op::NodeCos
Definition:
n_cos.h:15
FT::Pop::Op::NodeCount
Definition:
n_count.h:15
FT::Pop::Op::NodeCube
Definition:
n_cube.h:15
FT::Pop::Op::NodeDivide
Definition:
n_divide.h:15
FT::Pop::Op::NodeEqual
Definition:
n_equal.h:15
FT::Pop::Op::NodeExponent
Definition:
n_exponent.h:15
FT::Pop::Op::NodeExponential
Definition:
n_exponential.h:15
FT::Pop::Op::NodeFloat
Definition:
n_float.h:16
FT::Pop::Op::NodeFuzzyFixedSplit
Definition:
n_fuzzy_fixed_split.h:16
FT::Pop::Op::NodeFuzzySplit
Definition:
n_fuzzy_split.h:16
FT::Pop::Op::NodeGEQ
Definition:
n_geq.h:15
FT::Pop::Op::NodeGaussian
Definition:
n_gaussian.h:15
FT::Pop::Op::NodeGreaterThan
Definition:
n_greaterthan.h:15
FT::Pop::Op::NodeIfThenElse
Definition:
n_ifthenelse.h:15
FT::Pop::Op::NodeIf
Definition:
n_if.h:15
FT::Pop::Op::NodeKurtosis
Definition:
n_kurtosis.h:15
FT::Pop::Op::NodeLEQ
Definition:
n_leq.h:15
FT::Pop::Op::NodeLessThan
Definition:
n_lessthan.h:16
FT::Pop::Op::NodeLog
Definition:
n_log.h:15
FT::Pop::Op::NodeLogit
Definition:
n_logit.h:15
FT::Pop::Op::NodeMax
Definition:
n_max.h:15
FT::Pop::Op::NodeMean
Definition:
n_mean.h:15
FT::Pop::Op::NodeMedian
Definition:
n_median.h:15
FT::Pop::Op::NodeMin
Definition:
n_min.h:15
FT::Pop::Op::NodeMultiply
Definition:
n_multiply.h:15
FT::Pop::Op::NodeNot
Definition:
n_not.h:16
FT::Pop::Op::NodeOr
Definition:
n_or.h:16
FT::Pop::Op::NodeRecent
Definition:
n_recent.h:15
FT::Pop::Op::NodeRelu
Definition:
n_relu.h:15
FT::Pop::Op::NodeSign
Definition:
n_sign.h:15
FT::Pop::Op::NodeSin
Definition:
n_sin.h:15
FT::Pop::Op::NodeSkew
Definition:
n_skew.h:15
FT::Pop::Op::NodeSlope
Definition:
n_slope.h:15
FT::Pop::Op::NodeSplit
Definition:
n_split.h:16
FT::Pop::Op::NodeSqrt
Definition:
n_sqrt.h:15
FT::Pop::Op::NodeSquare
Definition:
n_square.h:15
FT::Pop::Op::NodeStep
Definition:
n_step.h:15
FT::Pop::Op::NodeSubtract
Definition:
n_subtract.h:15
FT::Pop::Op::NodeTanh
Definition:
n_tanh.h:15
FT::Pop::Op::NodeVar
Definition:
n_var.h:15
FT::Pop::Op::NodeVariable
Definition:
n_variable.h:16
FT::Pop::Op::NodeXor
Definition:
n_xor.h:15
FT::Pop::Op::NM
static NodeMap NM
Definition:
nodemap.h:93
FT
main Feat namespace
Definition:
data.cc:13
nodewrapper.h
FT::Pop::Op::NodeMap
Definition:
nodemap.h:15
FT::Pop::Op::NodeMap::~NodeMap
~NodeMap()
Definition:
nodemap.h:83
FT::Pop::Op::NodeMap::node_map
std::map< std::string, Node * > node_map
Definition:
nodemap.h:16
FT::Pop::Op::NodeMap::NodeMap
NodeMap()
Definition:
nodemap.h:18
src
pop
nodemap.h
Generated by
1.9.1