Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
nodetype.cpp
Go to the documentation of this file.
1#include "nodetype.h"
2
3namespace Brush{
4
5std::map<std::string, NodeType> NodeNameType = {
6 //arithmetic
7 {"Add", NodeType::Add},
8 {"Sub", NodeType::Sub},
9 {"Mul", NodeType::Mul},
10 {"Div", NodeType::Div},
11 /* {"Aq", NodeType::Aq}, */
12 {"Abs", NodeType::Abs},
13 {"Acos", NodeType::Acos},
14 {"Asin", NodeType::Asin},
15 {"Atan", NodeType::Atan},
16 {"Cos", NodeType::Cos},
17 {"Cosh", NodeType::Cosh},
18 {"Sin", NodeType::Sin},
19 {"Sinh", NodeType::Sinh},
20 {"Tan", NodeType::Tan},
21 {"Tanh", NodeType::Tanh},
22 {"Ceil", NodeType::Ceil},
23 {"Floor", NodeType::Floor},
24 {"Exp", NodeType::Exp},
25 {"Log", NodeType::Log},
26 {"Logabs", NodeType::Logabs},
27 {"Log1p", NodeType::Log1p},
28 {"Sqrt", NodeType::Sqrt},
29 {"Sqrtabs", NodeType::Sqrtabs},
30 {"Square", NodeType::Square},
31 {"Pow", NodeType::Pow},
32 {"Logistic", NodeType::Logistic},
33
34 // logic
35 {"And", NodeType::And},
36 {"Or", NodeType::Or},
37 {"Not", NodeType::Not},
38 // {"Xor", NodeType::Xor},
39
40 // decision (same)
41 /* {"Equals", NodeType::Equals}, */
42 /* {"LessThan", NodeType::LessThan}, */
43 /* {"GreaterThan", NodeType::GreaterThan}, */
44 /* {"Leq", NodeType::Leq}, */
45 /* {"Geq", NodeType::Geq}, */
46
47 // reductions
48 {"Min", NodeType::Min},
49 {"Max", NodeType::Max},
50 {"Mean", NodeType::Mean},
51 {"Median", NodeType::Median},
52 {"Count", NodeType::Count},
53 {"Sum", NodeType::Sum},
54 {"OffsetSum", NodeType::OffsetSum},
55 {"Prod", NodeType::Prod},
56 {"ArgMax", NodeType::ArgMax},
57
58 // transforms
59 {"Softmax", NodeType::Softmax},
60
61 // timing masks
62 {"Before", NodeType::Before},
63 {"After", NodeType::After},
64 {"During", NodeType::During},
65
66 //split
67 {"SplitBest", NodeType::SplitBest},
68 {"SplitOn", NodeType::SplitOn},
69
70 // leaves
71 {"MeanLabel", NodeType::MeanLabel},
72 {"Constant", NodeType::Constant},
73 {"Terminal", NodeType::Terminal},
74
75 // custom
76 {"CustomUnaryOp", NodeType::CustomUnaryOp},
77 {"CustomBinaryOp", NodeType::CustomBinaryOp},
78 {"CustomSplit", NodeType::CustomSplit}
79};
80
81std::map<NodeType,std::string> NodeTypeName = Util::reverse_map(NodeNameType);
82} // Brush
static map< V, K > reverse_map(const map< K, V > &m)
Given a map from keys to values, creates a new map from values to keys.
Definition utils.h:738
< nsga2 selection operator for getting the front
Definition data.cpp:12
std::map< std::string, NodeType > NodeNameType
Definition nodetype.cpp:5
std::map< NodeType, std::string > NodeTypeName
Definition nodetype.cpp:81