Feat C++ API
A feature engineering automation tool
|
Namespaces | |
Dat | |
namespace containing Data structures used in Feat | |
Eval | |
namespace containing various Evaluation classes used in Feat | |
Model | |
namespace containing ML methods used in Feat | |
Opt | |
namespace for backprop classes in Feat | |
Pop | |
namespace containing population representations used in Feat | |
Sel | |
namespace containing Selection methods for best individuals used in Feat | |
Util | |
namespace containing various utility functions used in Feat | |
Vary | |
namespace containing various variation methods for cross and mutation in Feat | |
Classes | |
class | Feat |
main class for the Feat learner. More... | |
class | Parameters |
holds the hyperparameters for Feat. More... | |
Functions | |
void | to_json (nl::json &, const Feat &) |
void | from_json (const nl::json &, Feat &) |
for (const auto &term :terminals) | |
op_weights | clear () |
for (const auto &op :functions) | |
for (unsigned i=0;i< functions.size();++i) | |
NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (Parameters, pop_size, gens, current_gen, ml, classification, max_stall, otypes, ttypes, otype, verbosity, term_weights, op_weights, fn_str, terminals, longitudinalMap, max_depth, max_size, max_dim, erc, num_features, objectives, shuffle, split, dtypes, feedback, n_classes, cross_rate, classes, class_weights, sample_weights, scorer, scorer_, feature_names, backprop, hillclimb, max_time, use_batch, residual_xo, stagewise_xo, stagewise_xo_tol, corr_delete_mutate, root_xo_rate, softmax_norm, normalize, protected_groups, tune_initial, tune_final) | |
Variables | |
static float | NEAR_ZERO = 0.0000001 |
static float | MAX_FLT = std::numeric_limits<float>::max() |
static float | MIN_FLT = std::numeric_limits<float>::lowest() |
int | b_count = 0 |
int | c_count = 0 |
int | f_count = 0 |
int | z_count = 0 |
int | total_terms = 0 |
int | i = 0 |
int | total_ops_terms = total_terms |
main Feat namespace
Integrate vectorList Integrate pointers? TODO Make it so stops traversing once it hits a non-differentiable node and then goes upstream and finds another branch to traverse
Integrate vectorList Integrate pointers? TODO Make it so stops traversing once it hits a non-differentiable node and then goes upstream and finds another branch to traverse
op_weights FT::clear | ( | ) |
void FT::from_json | ( | const nl::json & | , |
Feat & | |||
) |
FT::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE | ( | Parameters | , |
pop_size | , | ||
gens | , | ||
current_gen | , | ||
ml | , | ||
classification | , | ||
max_stall | , | ||
otypes | , | ||
ttypes | , | ||
otype | , | ||
verbosity | , | ||
term_weights | , | ||
op_weights | , | ||
fn_str | , | ||
terminals | , | ||
longitudinalMap | , | ||
max_depth | , | ||
max_size | , | ||
max_dim | , | ||
erc | , | ||
num_features | , | ||
objectives | , | ||
shuffle | , | ||
split | , | ||
dtypes | , | ||
feedback | , | ||
n_classes | , | ||
cross_rate | , | ||
classes | , | ||
class_weights | , | ||
sample_weights | , | ||
scorer | , | ||
scorer_ | , | ||
feature_names | , | ||
backprop | , | ||
hillclimb | , | ||
max_time | , | ||
use_batch | , | ||
residual_xo | , | ||
stagewise_xo | , | ||
stagewise_xo_tol | , | ||
corr_delete_mutate | , | ||
root_xo_rate | , | ||
softmax_norm | , | ||
normalize | , | ||
protected_groups | , | ||
tune_initial | , | ||
tune_final | |||
) |
void FT::to_json | ( | nl::json & | , |
const Feat & | |||
) |
FT::b_count = 0 |
Input: fs: string of comma-separated Node names Output: modifies functions ‍/
this->function_str = fs;
if (fs.empty()) fs = "+,-,*,/,^2,^3,sqrt,sin,cos,exp,log,^," "logit,tanh,gauss,relu," "split,split_c," "b2f,c2f,and,or,not,xor,=,<,<=,>,>=,if,ite"; fs += ','; // add delimiter to end string delim = ","; size_t pos = 0; string token; this->functions.clear(); while ((pos = fs.find(delim)) != string::npos) { token = fs.substr(0, pos);
functions.push_back(createNode(token));
fs.erase(0, pos + delim.length()); }
string log_msg = "functions: ["; for (int i =0; i < functions.size(); ++i) { log_msg += functions.at(i)->name ; if (i < functions.size()-1) log_msg += ", "; } log_msg += "]";
logger.log(log_msg, 3);
// reset output types set_otypes(); }
vector<string> Parameters::get_functions() { vector<string> fn_vec; for (const auto& fn : this->functions) fn_vec.push_back(fn->name); return fn_vec; }
void Parameters::set_functions(const vector<string>& fns) { this->functions.clear(); for (const auto& f : fns) functions.push_back(createNode(f)); reset output types set_otypes(); }
void Parameters::set_op_weights() { /*! sets operator weights proportionately to the number of variables of each type that they operate on in the input data. depends on terminals already being set.
|
static |
int FT::total_ops_terms = total_terms |