Feat C++ API
A feature engineering automation tool
|
an extension of a vector of unique pointers to nodes More...
#include <nodevector.h>
Public Member Functions | |
NodeVector () | |
~NodeVector () | |
NodeVector (const NodeVector &other) | |
NodeVector (NodeVector &&other) | |
NodeVector & | operator= (NodeVector const &other) |
NodeVector & | operator= (NodeVector &&other) |
vector< Node * > | get_data (int start=0, int end=0) |
returns vector of raw pointers to nodes in [start,end], or all if both are zero More... | |
vector< size_t > | roots () const |
returns indices of root nodes More... | |
size_t | subtree (size_t i, char otype='0', string indent="> ") const |
void | set_weights (vector< vector< float >> &weights) |
vector< vector< float > > | get_weights () |
bool | is_valid_program (unsigned num_features, vector< string > longitudinalMap) |
void | make_tree (const NodeVector &functions, const NodeVector &terminals, int max_d, const vector< float > &term_weights, const vector< float > &op_weights, char otype, const vector< char > &term_types) |
void | make_program (const NodeVector &functions, const NodeVector &terminals, int max_d, const vector< float > &term_weights, const vector< float > &op_weights, int dim, char otype, vector< string > longitudinalMap, const vector< char > &term_types) |
an extension of a vector of unique pointers to nodes
Definition at line 23 of file nodevector.h.
|
default |
|
default |
FT::Pop::NodeVector::NodeVector | ( | const NodeVector & | other | ) |
Definition at line 20 of file nodevector.cc.
|
default |
vector< Node * > FT::Pop::NodeVector::get_data | ( | int | start = 0 , |
int | end = 0 |
||
) |
returns vector of raw pointers to nodes in [start,end], or all if both are zero
Definition at line 38 of file nodevector.cc.
vector< vector< float > > FT::Pop::NodeVector::get_weights | ( | ) |
Definition at line 189 of file nodevector.cc.
bool FT::Pop::NodeVector::is_valid_program | ( | unsigned | num_features, |
vector< string > | longitudinalMap | ||
) |
checks whether program fulfills all its arities.
Definition at line 202 of file nodevector.cc.
void FT::Pop::NodeVector::make_program | ( | const NodeVector & | functions, |
const NodeVector & | terminals, | ||
int | max_d, | ||
const vector< float > & | term_weights, | ||
const vector< float > & | op_weights, | ||
int | dim, | ||
char | otype, | ||
vector< string > | longitudinalMap, | ||
const vector< char > & | term_types | ||
) |
Definition at line 368 of file nodevector.cc.
void FT::Pop::NodeVector::make_tree | ( | const NodeVector & | functions, |
const NodeVector & | terminals, | ||
int | max_d, | ||
const vector< float > & | term_weights, | ||
const vector< float > & | op_weights, | ||
char | otype, | ||
const vector< char > & | term_types | ||
) |
recursively builds a program with complete arguments.
Definition at line 243 of file nodevector.cc.
|
default |
NodeVector & FT::Pop::NodeVector::operator= | ( | NodeVector const & | other | ) |
Definition at line 28 of file nodevector.cc.
vector< size_t > FT::Pop::NodeVector::roots | ( | ) | const |
returns indices of root nodes
Definition at line 55 of file nodevector.cc.
void FT::Pop::NodeVector::set_weights | ( | vector< vector< float >> & | weights | ) |
Definition at line 150 of file nodevector.cc.
size_t FT::Pop::NodeVector::subtree | ( | size_t | i, |
char | otype = '0' , |
||
string | indent = "> " |
||
) | const |
finds index of the end of subtree in program with root i.
Input:
i, root index of subtree
Output:
last index in subtree, <= i
note that this function assumes a subtree's arguments to be contiguous in the program.
Definition at line 80 of file nodevector.cc.