Feat C++ API
A feature engineering automation tool
random.h
Go to the documentation of this file.
1 /* FEAT
2 copyright 2017 William La Cava
3 license: GNU/GPL v3
4 */
5 #ifndef RANDOM_H
6 #define RANDOM_H
7 
8 #include "selection_operator.h"
9 
10 namespace FT{
11 
12  namespace Sel{
14 
18  {
21  Random(bool surv);
22 
23  ~Random();
24 
25  vector<size_t> select(Population& pop,
26  const Parameters& params, const Data& d);
27  vector<size_t> survive(Population& pop,
28  const Parameters& params, const Data& d);
30  void enforce_elite(Population& pop, vector<size_t>& selected);
31  bool elitism; //< whether or not to keep the best individual.
32 
33  };
34 
35  }
36 
37 }
38 #endif
data holding X, y, and Z data
Definition: data.h:42
T pop(vector< T > *v)
Definition: auto_backprop.h:49
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
Random(bool surv)
Definition: random.cc:14
bool elitism
Definition: random.h:31
vector< size_t > survive(Population &pop, const Parameters &params, const Data &d)
Definition: random.cc:47
vector< size_t > select(Population &pop, const Parameters &params, const Data &d)
Definition: random.cc:18
void enforce_elite(Population &pop, vector< size_t > &selected)
replaces worst individual in selected with best individual in Pop.
Definition: random.cc:75
base class for selection operators.