Feat C++ API
A feature engineering automation tool
evaluation.h
Go to the documentation of this file.
1 /* FEAT
2 copyright 2017 William La Cava
3 license: GNU/GPL v3
4 */
5 #ifndef EVALUATION_H
6 #define EVALUATION_H
7 // internal includes
8 #include "../model/ml.h"
9 #include "scorer.h"
10 #include "../opt/auto_backprop.h"
11 #include "../opt/hillclimb.h"
12 using namespace shogun;
13 using Eigen::Map;
14 
15 // code to evaluate GP programs.
16 namespace FT{
17 
22  namespace Eval{
23 
25 
29  /* typedef float (*funcPointer)(const VectorXf&, */
30  /* const shared_ptr<CLabels>&, VectorXf&, */
31  /* const vector<float>&); */
32 
33  class Evaluation
34  {
35  public:
36 
37  /* float (* score)(const VectorXf&, */
38  /* const shared_ptr<CLabels>&, */
39  /* VectorXf&, */
40  /* const vector<float>&); // pointer to scoring function */
41 
42  /* std::map<string, funcPointer> score_hash; */
43 
44  Evaluation(string scorer="");
45 
46  ~Evaluation();
47 
48  /* void set_score(string scorer); */
49 
51  void validation(vector<Individual>& individuals,
52  const Data& d,
53  const Parameters& params,
54  bool offspring = false
55  );
56 
58  void fitness(vector<Individual>& individuals,
59  const Data& d,
60  const Parameters& params,
61  bool offspring = false
62  );
63 
64 
65  float marginal_fairness(VectorXf& loss, const Data& d,
66  float base_score, bool use_alpha=false);
67 
69  void assign_fit(Individual& ind,
70  const shared_ptr<CLabels>& yhat,
71  const Data& d,
72  const Parameters& params,bool val=false);
73 
75  };
76  }
77 }
78 #endif
data holding X, y, and Z data
Definition: data.h:42
evaluation mixin class for Feat
Definition: evaluation.h:34
scoring class for Feat
Definition: scorer.h:31
individual programs in the population
Definition: individual.h:31
main Feat namespace
Definition: data.cc:13
holds the hyperparameters for Feat.
Definition: params.h:25