32 bool classification =
false;
47 unsigned int max_depth = 3;
49 unsigned int max_dim = 10;
52 vector<string> objectives{
"fitness",
"complexity"};
65 bool backprop =
false;
66 bool hillclimb =
false;
68 bool use_batch =
false;
69 bool residual_xo=
false;
70 bool stagewise_xo=
false;
71 bool stagewise_xo_tol=
true;
72 bool corr_delete_mutate=
false;
73 float root_xo_rate = 0.5;
86 float learning_rate = 0.1;
88 BP(
int i,
float l,
int bs): iters(
i), learning_rate(l), batch_size(bs) {};
98 HC(
int i,
float s): iters(
i), step(s) {};
121 void init(
const MatrixXf& X,
const VectorXf& y);
124 void set_current_gen(
int g);
127 void set_scorer(
string sc=
"",
bool initialized=
false);
130 void set_term_weights(
const vector<float>& w);
136 std::unique_ptr<Node> createNode(std::string str,
float d_val = 0,
bool b_val =
false,
137 size_t loc = 0,
string name =
"");
148 void set_max_depth(
unsigned int max_depth);
151 void set_max_dim(
unsigned int max_dim);
154 void set_terminals(
int nf,
const LongData& Z);
157 void set_feature_names(
string fn);
158 string get_feature_names();
160 string get_protected_groups();
161 void set_protected_groups(
string fn);
166 void set_objectives(
const vector<string>& obj);
169 void set_verbosity(
int verbosity);
171 void set_otype(
char ot);
176 void set_otypes(
bool terminals_set=
false);
179 void set_classes(
const VectorXf& y);
182 void set_sample_weights(VectorXf& y);
std::map< string, std::pair< vector< ArrayXf >, vector< ArrayXf > > > LongData
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(NodeFuzzyFixedSplit< float >, name, otype, arity, complexity, visits, train, threshold, threshold_set) NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE(NodeFuzzyFixedSplit< int >
BP(int i, float l, int bs)
holds the hyperparameters for Feat.
bool softmax_norm
use softmax norm on probabilities
vector< string > get_functions()
returns the set of functions to use determined at run-time.
vector< char > dtypes
data types of input parameters
unsigned int max_size
max size of programs (length)
void set_op_weights()
sets weights for operators.
float cross_rate
cross rate for variation
vector< int > classes
class labels
vector< float > class_weights
weights for each class
vector< float > sample_weights
weights for each sample
unsigned int n_classes
number of classes for classification
void set_functions(const vector< string > &fns)
sets available functions and verifies output types.
string scorer
loss function argument
NodeVector functions
function nodes available in programs
string ml
machine learner used with Feat
vector< float > term_weights
probability weighting of terminals
HC hc
stochastic hill climbing parameters
unsigned num_features
number of features
void set_terminals(int nf)
bool tune_initial
tune initial ML model
int current_gen
holds current generation
bool normalize
whether to normalize the input data
void initialize_node_map()
defines a map of function names to their respective nodes.
vector< std::string > longitudinalMap
NodeVector terminals
terminal nodes available in programs vector storing longitudinal data keys
vector< string > feature_names
names of features
vector< bool > protected_groups
protected attributes in X
std::map< std::string, Node * > node_map
vector< char > ttypes
program terminal types ('f', 'b')
vector< char > otypes
program output types ('f', 'b')
vector< float > op_weights
probability weighting of functions
char otype
user parameter for output type setup
auto get_objectives()
get objectives as comma-delimited string
bool tune_final
tune final ML model string of comma-delimited operator names, used to choose functions
string scorer_
actual loss function used, determined by scorer
int random_state
random seed
an extension of a vector of unique pointers to nodes