Feat C++ API
A feature engineering automation tool
|
holds the hyperparameters for Feat. More...
#include <params.h>
Classes | |
struct | BP |
struct | HC |
Public Member Functions | |
Parameters () | |
~Parameters () | |
void | init (const MatrixXf &X, const VectorXf &y) |
void | set_current_gen (int g) |
sets current generation More... | |
void | set_scorer (string sc="", bool initialized=false) |
sets scorer type More... | |
void | set_term_weights (const vector< float > &w) |
sets weights for terminals. More... | |
void | set_op_weights () |
sets weights for operators. More... | |
std::unique_ptr< Node > | createNode (std::string str, float d_val=0, bool b_val=false, size_t loc=0, string name="") |
return unique pointer to a node based on the string passed More... | |
vector< string > | get_functions () |
returns the set of functions to use determined at run-time. More... | |
void | set_functions (const vector< string > &fns) |
sets available functions and verifies output types. More... | |
void | updateSize () |
max_size is max_dim binary trees of max_depth More... | |
void | set_max_depth (unsigned int max_depth) |
set max depth of programs More... | |
void | set_max_dim (unsigned int max_dim) |
set maximum dimensionality of programs More... | |
void | set_terminals (int nf, const LongData &Z) |
set the terminals with longitudinal data More... | |
void | set_terminals (int nf) |
void | set_feature_names (string fn) |
string | get_feature_names () |
string | get_protected_groups () |
void | set_protected_groups (string fn) |
auto | get_objectives () |
get objectives as comma-delimited string More... | |
void | set_objectives (const vector< string > &obj) |
set the objectives More... | |
void | set_verbosity (int verbosity) |
set level of debug info More... | |
void | set_otype (char ot) |
void | set_ttypes () |
void | set_otypes (bool terminals_set=false) |
set the output types of programs More... | |
void | set_classes (const VectorXf &y) |
sets the number of classes based on target vector y. More... | |
void | set_sample_weights (VectorXf &y) |
sets the weights of each sample (and class weights) More... | |
void | initialize_node_map () |
defines a map of function names to their respective nodes. More... | |
Public Attributes | |
std::map< std::string, Node * > | node_map |
int | random_state |
random seed More... | |
int | pop_size = 100 |
population size More... | |
int | gens = 100 |
max generations More... | |
int | current_gen |
holds current generation More... | |
string | ml |
machine learner used with Feat More... | |
bool | classification = false |
flag to conduct classification rather than More... | |
int | max_stall = 0 |
maximum stall in learning, in generations More... | |
vector< char > | otypes |
program output types ('f', 'b') More... | |
vector< char > | ttypes |
program terminal types ('f', 'b') More... | |
char | otype |
user parameter for output type setup More... | |
int | verbosity = 0 |
vector< float > | term_weights |
probability weighting of terminals More... | |
vector< float > | op_weights |
probability weighting of functions More... | |
NodeVector | functions |
function nodes available in programs More... | |
NodeVector | terminals |
terminal nodes available in programs vector storing longitudinal data keys More... | |
vector< std::string > | longitudinalMap |
unsigned int | max_depth = 3 |
max depth of programs More... | |
unsigned int | max_size |
max size of programs (length) More... | |
unsigned int | max_dim = 10 |
maximum dimensionality of programs More... | |
bool | erc = false |
whether to include constants for terminals More... | |
unsigned | num_features |
number of features More... | |
vector< string > | objectives {"fitness","complexity"} |
Pareto objectives. More... | |
bool | shuffle = true |
option to shuffle the data More... | |
float | split = 0.75 |
fraction of data to use for training More... | |
vector< char > | dtypes |
data types of input parameters More... | |
float | feedback = 0.5 |
strength of ml feedback on probabilities More... | |
unsigned int | n_classes |
number of classes for classification More... | |
float | cross_rate |
cross rate for variation More... | |
vector< int > | classes |
class labels More... | |
vector< float > | class_weights |
weights for each class More... | |
vector< float > | sample_weights |
weights for each sample More... | |
string | scorer |
loss function argument More... | |
string | scorer_ |
actual loss function used, determined by scorer More... | |
vector< string > | feature_names |
names of features More... | |
bool | backprop = false |
turns on backpropagation More... | |
bool | hillclimb = false |
turns on parameter hill climbing More... | |
int | max_time = -1 |
max time for fit method More... | |
bool | use_batch = false |
whether to use mini batch for training More... | |
bool | residual_xo =false |
use residual crossover More... | |
bool | stagewise_xo =false |
use stagewise crossover More... | |
bool | stagewise_xo_tol =true |
use stagewise crossover More... | |
bool | corr_delete_mutate =false |
use correlation delete mutation More... | |
float | root_xo_rate = 0.5 |
crossover More... | |
bool | softmax_norm |
use softmax norm on probabilities More... | |
bool | normalize |
whether to normalize the input data More... | |
vector< bool > | protected_groups |
protected attributes in X More... | |
bool | tune_initial |
tune initial ML model More... | |
bool | tune_final |
tune final ML model string of comma-delimited operator names, used to choose functions More... | |
string | fn_str |
int | n_jobs = 1 |
number of parallel jobs More... | |
BP | bp |
backprop parameters More... | |
HC | hc |
stochastic hill climbing parameters More... | |
std::unique_ptr< Node > FT::Parameters::createNode | ( | std::string | str, |
float | d_val = 0 , |
||
bool | b_val = false , |
||
size_t | loc = 0 , |
||
string | name = "" |
||
) |
vector<string> FT::Parameters::get_functions | ( | ) |
returns the set of functions to use determined at run-time.
|
inline |
void FT::Parameters::init | ( | const MatrixXf & | X, |
const VectorXf & | y | ||
) |
void FT::Parameters::initialize_node_map | ( | ) |
defines a map of function names to their respective nodes.
void FT::Parameters::set_classes | ( | const VectorXf & | y | ) |
void FT::Parameters::set_current_gen | ( | int | g | ) |
void FT::Parameters::set_functions | ( | const vector< string > & | fns | ) |
sets available functions and verifies output types.
void FT::Parameters::set_max_depth | ( | unsigned int | max_depth | ) |
void FT::Parameters::set_max_dim | ( | unsigned int | max_dim | ) |
void FT::Parameters::set_objectives | ( | const vector< string > & | obj | ) |
void FT::Parameters::set_op_weights | ( | ) |
sets weights for operators.
void FT::Parameters::set_otypes | ( | bool | terminals_set = false | ) |
void FT::Parameters::set_sample_weights | ( | VectorXf & | y | ) |
void FT::Parameters::set_scorer | ( | string | sc = "" , |
bool | initialized = false |
||
) |
void FT::Parameters::set_term_weights | ( | const vector< float > & | w | ) |
void FT::Parameters::set_terminals | ( | int | nf, |
const LongData & | Z | ||
) |
void FT::Parameters::set_verbosity | ( | int | verbosity | ) |
void FT::Parameters::updateSize | ( | ) |
bool FT::Parameters::backprop = false |
vector<float> FT::Parameters::class_weights |
bool FT::Parameters::classification = false |
bool FT::Parameters::corr_delete_mutate =false |
vector<char> FT::Parameters::dtypes |
bool FT::Parameters::erc = false |
vector<string> FT::Parameters::feature_names |
float FT::Parameters::feedback = 0.5 |
NodeVector FT::Parameters::functions |
bool FT::Parameters::hillclimb = false |
unsigned int FT::Parameters::max_depth = 3 |
unsigned int FT::Parameters::max_dim = 10 |
unsigned int FT::Parameters::max_size |
int FT::Parameters::max_stall = 0 |
unsigned int FT::Parameters::n_classes |
bool FT::Parameters::normalize |
vector<string> FT::Parameters::objectives {"fitness","complexity"} |
vector<float> FT::Parameters::op_weights |
char FT::Parameters::otype |
vector<char> FT::Parameters::otypes |
vector<bool> FT::Parameters::protected_groups |
bool FT::Parameters::residual_xo =false |
vector<float> FT::Parameters::sample_weights |
string FT::Parameters::scorer_ |
bool FT::Parameters::shuffle = true |
bool FT::Parameters::softmax_norm |
float FT::Parameters::split = 0.75 |
bool FT::Parameters::stagewise_xo =false |
bool FT::Parameters::stagewise_xo_tol =true |
vector<float> FT::Parameters::term_weights |
NodeVector FT::Parameters::terminals |
vector<char> FT::Parameters::ttypes |
bool FT::Parameters::tune_final |
bool FT::Parameters::use_batch = false |
int FT::Parameters::verbosity = 0 |