Brush C++ API
A flexible interpretable machine learning framework
|
#include <individual.h>
Public Member Functions | |
Individual () | |
Individual (Program< T > &prg) | |
void | init (SearchSpace &ss, const Parameters ¶ms) |
Individual< T > & | fit (const Dataset &data) |
Individual< T > & | fit (const Ref< const ArrayXXf > &X, const Ref< const ArrayXf > &y) |
auto | predict (const Dataset &data) |
auto | predict (const Ref< const ArrayXXf > &X) |
template<ProgramType P = T> requires ((P == PT::BinaryClassifier) || (P == PT::MulticlassClassifier)) | |
auto | predict_proba (const Dataset &d) |
template<ProgramType P = T> requires ((P == PT::BinaryClassifier) || (P == PT::MulticlassClassifier)) | |
auto | predict_proba (const Ref< const ArrayXXf > &X) |
bool | get_is_fitted () const |
unsigned int | get_size () const |
unsigned int | get_depth () const |
unsigned int | get_complexity () const |
Program< T > & | get_program () |
string | get_model (string fmt="compact", bool pretty=false) |
string | get_dot_model (string extras="") |
void | set_fitness (Fitness &f) |
Fitness & | get_fitness () |
void | set_id (unsigned i) |
void | set_parents (const vector< Individual< T > > &parents) |
void | set_parents (const vector< unsigned > &parents) |
set parent ids using parents | |
vector< string > | get_objectives () const |
void | set_objectives (vector< string > objs) |
Public Attributes | |
Program< T > | program |
executable data structure | |
bool | is_fitted_ = false |
unsigned | id |
tracking id | |
vector< unsigned > | parent_id |
ids of parents | |
VectorXf | error |
training error (used in lexicase selectors) | |
Fitness | fitness |
aggregate fitness score | |
vector< string > | objectives |
objectives for use with Pareto selection | |
Static Public Attributes | |
static std::map< std::string, float > | weightsMap |
set parent ids using id values | |
Definition at line 15 of file individual.h.
|
inline |
Definition at line 37 of file individual.h.
|
inline |
Definition at line 43 of file individual.h.
|
inline |
|
inline |
Definition at line 60 of file individual.h.
|
inline |
|
inline |
|
inline |
Definition at line 93 of file individual.h.
|
inline |
Definition at line 97 of file individual.h.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 89 of file individual.h.
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 67 of file individual.h.
|
inline |
|
inline |
Definition at line 78 of file individual.h.
|
inline |
Definition at line 96 of file individual.h.
|
inline |
|
inline |
|
inline |
|
inline |
set parent ids using parents
Definition at line 105 of file individual.h.
VectorXf Brush::Pop::Individual< T >::error |
training error (used in lexicase selectors)
Definition at line 31 of file individual.h.
Fitness Brush::Pop::Individual< T >::fitness |
aggregate fitness score
Definition at line 33 of file individual.h.
unsigned Brush::Pop::Individual< T >::id |
tracking id
Definition at line 28 of file individual.h.
bool Brush::Pop::Individual< T >::is_fitted_ = false |
Definition at line 24 of file individual.h.
vector<string> Brush::Pop::Individual< T >::objectives |
objectives for use with Pareto selection
Definition at line 35 of file individual.h.
vector<unsigned> Brush::Pop::Individual< T >::parent_id |
ids of parents
Definition at line 29 of file individual.h.
Program<T> Brush::Pop::Individual< T >::program |
executable data structure
Definition at line 17 of file individual.h.
|
inlinestatic |
set parent ids using id values
Definition at line 116 of file individual.h.