Feat C++ API
A feature engineering automation tool
selection.h
Go to the documentation of this file.
1 /* FEAT
2 copyright 2017 William La Cava
3 license: GNU/GPL v3
4 */
5 
6 #ifndef SELECTION_H
7 #define SELECTION_H
8 
9 #include "selection_operator.h"
10 #include "lexicase.h"
11 #include "fair_lexicase.h"
12 #include "nsga2.h"
13 #include "tournament.h"
14 #include "offspring.h"
15 #include "random.h"
16 #include "simulated_annealing.h"
17 
18 namespace FT{
19 
20 
21  struct Parameters; // forward declaration of Parameters
22 
28  namespace Sel{
30 
35  struct Selection
36  {
37  shared_ptr<SelectionOperator> pselector;
38  string type;
39  bool survival;
40 
41  Selection();
42  ~Selection();
43  Selection(string type, bool survival);
44 
45  void set_operator();
46 
48  string get_type();
49  void set_type(string);
50 
52  vector<size_t> select(Population& pop,
53  const Parameters& params, const Data& d);
54 
56  vector<size_t> survive(Population& pop,
57  const Parameters& params, const Data& d);
58  };
59 
61 
62  }
63 
64 }
65 #endif
data holding X, y, and Z data
Definition: data.h:42
T pop(vector< T > *v)
Definition: auto_backprop.h:49
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(Selection, type, survival)
main Feat namespace
Definition: data.cc:13
holds the hyperparameters for Feat.
Definition: params.h:25
Defines a population of programs and functions for constructing them.
Definition: population.h:28
interfaces with selection operators.
Definition: selection.h:36
string get_type()
return type of selectionoperator
Definition: selection.cc:55
void set_type(string)
set type of selectionoperator
Definition: selection.cc:58
vector< size_t > survive(Population &pop, const Parameters &params, const Data &d)
perform survival
Definition: selection.cc:68
shared_ptr< SelectionOperator > pselector
Definition: selection.h:37
vector< size_t > select(Population &pop, const Parameters &params, const Data &d)
perform selection
Definition: selection.cc:61