Feat C++ API
A feature engineering automation tool
archive.h
Go to the documentation of this file.
1 /* FEAT
2 copyright 2017 William La Cava
3 license: GNU/GPL v3
4 */
5 #ifndef ARCHIVE_H
6 #define ARCHIVE_H
7 
8 //#include "node.h" // including node.h since definition of node is in the header
9 #include "individual.h"
10 #include "../sel/nsga2.h"
11 using std::vector;
12 using std::string;
13 using Eigen::Map;
14 
15 namespace FT{
16 
17 using namespace Sel;
19 
24 namespace Pop{
25 
26 struct Archive
27 {
28  vector<Individual> individuals;
30 
32 
33  Archive();
34  void set_objectives(vector<string> objectives);
36  static bool sortComplexity(const Individual& lhs,
37  const Individual& rhs);
39  static bool sortObj1(const Individual& lhs,
40  const Individual& rhs);
42  static bool sameFitComplexity(const Individual& lhs,
43  const Individual& rhs);
44  static bool sameObjectives(const Individual& lhs,
45  const Individual& rhs);
46 
47  void init(Population& pop);
48 
49  void update(const Population& pop, const Parameters& params);
50 
51 };
52 //serialization
54 } // Pop
55 } // FT
56 #endif
individual programs in the population
Definition: individual.h:31
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
bool sort_complexity
whether to sort archive by complexity
Definition: archive.h:29
NSGA2 selector
nsga2 selection operator for getting the front
Definition: archive.h:31
vector< Individual > individuals
individual programs in the archive
Definition: archive.h:28
Defines a population of programs and functions for constructing them.
Definition: population.h:28