Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
Brush::Parameters Struct Reference

#include <params.h>

Collaboration diagram for Brush::Parameters:

Public Member Functions

 Parameters ()
 
 ~Parameters ()
 
void set_verbosity (int new_verbosity)
 
int get_verbosity ()
 
void set_random_state (int new_random_state)
 
int get_random_state ()
 
void set_pop_size (int new_pop_size)
 
int get_pop_size ()
 
void set_max_gens (int new_max_gens)
 
int get_max_gens ()
 
void set_max_stall (int new_max_stall)
 
int get_max_stall ()
 
void set_max_time (int new_max_time)
 
int get_max_time ()
 
void set_scorer_ (string new_scorer_)
 
string get_scorer_ ()
 
void set_load_population (string new_load_population)
 
string get_load_population ()
 
void set_save_population (string new_save_population)
 
string get_save_population ()
 
string get_logfile ()
 
void set_logfile (string s)
 
void set_current_gen (unsigned int gen)
 
unsigned int get_current_gen ()
 
void set_num_islands (int new_num_islands)
 
int get_num_islands ()
 
void set_max_depth (unsigned new_max_depth)
 
unsigned get_max_depth () const
 
void set_n_jobs (int new_n_jobs)
 
int get_n_jobs ()
 
void set_max_size (unsigned new_max_size)
 
unsigned get_max_size () const
 
void set_objectives (vector< string > new_objectives)
 
vector< string > get_objectives ()
 
void set_sel (string new_sel)
 
string get_sel ()
 
void set_surv (string new_surv)
 
string get_surv ()
 
void set_cx_prob (float new_cx_prob)
 
float get_cx_prob ()
 
void set_mig_prob (float new_mig_prob)
 
float get_mig_prob ()
 
void set_use_arch (bool new_use_arch)
 
bool get_use_arch ()
 
void set_val_from_arch (bool new_val_from_arch)
 
bool get_val_from_arch ()
 
void set_classification (bool c)
 
bool get_classification ()
 
void set_shuffle_split (bool shuff)
 
bool get_shuffle_split ()
 
void set_n_classes (unsigned int new_n_classes)
 
unsigned int get_n_classes ()
 
void set_validation_size (float s)
 
float get_validation_size ()
 
void set_feature_names (vector< string > vn)
 
vector< string > get_feature_names ()
 
void set_batch_size (float c)
 
float get_batch_size ()
 
void set_mutation_probs (std::map< std::string, float > new_mutation_probs)
 
std::map< std::string, floatget_mutation_probs ()
 
void set_functions (std::unordered_map< std::string, float > new_functions)
 
std::unordered_map< std::string, floatget_functions ()
 

Public Attributes

int random_state = 0
 
int verbosity = 0
 
string mode ="regression"
 
unsigned int current_gen = 1
 
int pop_size = 100
 
int max_gens = 100
 
int max_stall = 0
 
int max_time = -1
 
unsigned int max_depth = 6
 
unsigned int max_size = 50
 
vector< string > objectives {"error","complexity"}
 
string sel = "lexicase"
 
string surv = "nsga2"
 
std::unordered_map< string, floatfunctions
 
int num_islands =5
 
bool use_arch =false
 
bool val_from_arch =true
 
std::map< std::string, floatmutation_probs
 
float cx_prob =0.2
 cross rate for variation
 
float mig_prob = 0.05
 
string scorer_ ="mse"
 actual loss function used, determined by error
 
vector< intclasses
 class labels
 
vector< floatclass_weights
 weights for each class
 
vector< floatsample_weights
 weights for each sample
 
bool classification
 
unsigned int n_classes
 
bool shuffle_split = false
 
float validation_size = 0.75
 
vector< string > feature_names = {}
 
float batch_size = 0.0
 
string load_population = ""
 
string save_population = ""
 
string logfile = ""
 
int n_jobs = 1
 number of parallel jobs -1 use all threads; 0 use same as number of islands; positive number specify the amouut of threads
 

Detailed Description

Definition at line 17 of file params.h.

Constructor & Destructor Documentation

◆ Parameters()

Brush::Parameters::Parameters ( )
inline

Definition at line 87 of file params.h.

◆ ~Parameters()

Brush::Parameters::~Parameters ( )
inline

Definition at line 88 of file params.h.

Member Function Documentation

◆ get_batch_size()

float Brush::Parameters::get_batch_size ( )
inline

Definition at line 174 of file params.h.

Here is the caller graph for this function:

◆ get_classification()

bool Brush::Parameters::get_classification ( )
inline

Definition at line 159 of file params.h.

Here is the caller graph for this function:

◆ get_current_gen()

unsigned int Brush::Parameters::get_current_gen ( )
inline

Definition at line 123 of file params.h.

Here is the caller graph for this function:

◆ get_cx_prob()

float Brush::Parameters::get_cx_prob ( )
inline

Definition at line 147 of file params.h.

Here is the caller graph for this function:

◆ get_feature_names()

vector< string > Brush::Parameters::get_feature_names ( )
inline

Definition at line 171 of file params.h.

Here is the caller graph for this function:

◆ get_functions()

std::unordered_map< std::string, float > Brush::Parameters::get_functions ( )
inline

Definition at line 180 of file params.h.

Here is the caller graph for this function:

◆ get_load_population()

string Brush::Parameters::get_load_population ( )
inline

Definition at line 114 of file params.h.

Here is the caller graph for this function:

◆ get_logfile()

string Brush::Parameters::get_logfile ( )
inline

Definition at line 119 of file params.h.

Here is the caller graph for this function:

◆ get_max_depth()

unsigned Brush::Parameters::get_max_depth ( ) const
inline

Definition at line 129 of file params.h.

Here is the caller graph for this function:

◆ get_max_gens()

int Brush::Parameters::get_max_gens ( )
inline

Definition at line 102 of file params.h.

Here is the caller graph for this function:

◆ get_max_size()

unsigned Brush::Parameters::get_max_size ( ) const
inline

Definition at line 135 of file params.h.

Here is the caller graph for this function:

◆ get_max_stall()

int Brush::Parameters::get_max_stall ( )
inline

Definition at line 105 of file params.h.

Here is the caller graph for this function:

◆ get_max_time()

int Brush::Parameters::get_max_time ( )
inline

Definition at line 108 of file params.h.

Here is the caller graph for this function:

◆ get_mig_prob()

float Brush::Parameters::get_mig_prob ( )
inline

Definition at line 150 of file params.h.

Here is the caller graph for this function:

◆ get_mutation_probs()

std::map< std::string, float > Brush::Parameters::get_mutation_probs ( )
inline

Definition at line 177 of file params.h.

Here is the caller graph for this function:

◆ get_n_classes()

unsigned int Brush::Parameters::get_n_classes ( )
inline

Definition at line 165 of file params.h.

Here is the caller graph for this function:

◆ get_n_jobs()

int Brush::Parameters::get_n_jobs ( )
inline

Definition at line 132 of file params.h.

Here is the caller graph for this function:

◆ get_num_islands()

int Brush::Parameters::get_num_islands ( )
inline

Definition at line 126 of file params.h.

Here is the caller graph for this function:

◆ get_objectives()

vector< string > Brush::Parameters::get_objectives ( )
inline

Definition at line 138 of file params.h.

Here is the caller graph for this function:

◆ get_pop_size()

int Brush::Parameters::get_pop_size ( )
inline

Definition at line 99 of file params.h.

Here is the caller graph for this function:

◆ get_random_state()

int Brush::Parameters::get_random_state ( )
inline

Definition at line 96 of file params.h.

Here is the caller graph for this function:

◆ get_save_population()

string Brush::Parameters::get_save_population ( )
inline

Definition at line 117 of file params.h.

Here is the caller graph for this function:

◆ get_scorer_()

string Brush::Parameters::get_scorer_ ( )
inline

Definition at line 111 of file params.h.

Here is the caller graph for this function:

◆ get_sel()

string Brush::Parameters::get_sel ( )
inline

Definition at line 141 of file params.h.

Here is the caller graph for this function:

◆ get_shuffle_split()

bool Brush::Parameters::get_shuffle_split ( )
inline

Definition at line 162 of file params.h.

Here is the caller graph for this function:

◆ get_surv()

string Brush::Parameters::get_surv ( )
inline

Definition at line 144 of file params.h.

Here is the caller graph for this function:

◆ get_use_arch()

bool Brush::Parameters::get_use_arch ( )
inline

Definition at line 153 of file params.h.

Here is the caller graph for this function:

◆ get_val_from_arch()

bool Brush::Parameters::get_val_from_arch ( )
inline

Definition at line 156 of file params.h.

Here is the caller graph for this function:

◆ get_validation_size()

float Brush::Parameters::get_validation_size ( )
inline

Definition at line 168 of file params.h.

Here is the caller graph for this function:

◆ get_verbosity()

int Brush::Parameters::get_verbosity ( )
inline

Definition at line 93 of file params.h.

Here is the caller graph for this function:

◆ set_batch_size()

void Brush::Parameters::set_batch_size ( float c)
inline

Definition at line 173 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_classification()

void Brush::Parameters::set_classification ( bool c)
inline

Definition at line 158 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_current_gen()

void Brush::Parameters::set_current_gen ( unsigned int gen)
inline

Definition at line 122 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_cx_prob()

void Brush::Parameters::set_cx_prob ( float new_cx_prob)
inline

Definition at line 146 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_feature_names()

void Brush::Parameters::set_feature_names ( vector< string > vn)
inline

Definition at line 170 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_functions()

void Brush::Parameters::set_functions ( std::unordered_map< std::string, float > new_functions)
inline

Definition at line 179 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_load_population()

void Brush::Parameters::set_load_population ( string new_load_population)
inline

Definition at line 113 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_logfile()

void Brush::Parameters::set_logfile ( string s)
inline

Definition at line 120 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_max_depth()

void Brush::Parameters::set_max_depth ( unsigned new_max_depth)
inline

Definition at line 128 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_max_gens()

void Brush::Parameters::set_max_gens ( int new_max_gens)
inline

Definition at line 101 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_max_size()

void Brush::Parameters::set_max_size ( unsigned new_max_size)
inline

Definition at line 134 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_max_stall()

void Brush::Parameters::set_max_stall ( int new_max_stall)
inline

Definition at line 104 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_max_time()

void Brush::Parameters::set_max_time ( int new_max_time)
inline

Definition at line 107 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_mig_prob()

void Brush::Parameters::set_mig_prob ( float new_mig_prob)
inline

Definition at line 149 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_mutation_probs()

void Brush::Parameters::set_mutation_probs ( std::map< std::string, float > new_mutation_probs)
inline

Definition at line 176 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_n_classes()

void Brush::Parameters::set_n_classes ( unsigned int new_n_classes)
inline

Definition at line 164 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_n_jobs()

void Brush::Parameters::set_n_jobs ( int new_n_jobs)
inline

Definition at line 131 of file params.h.

Here is the call graph for this function:

◆ set_num_islands()

void Brush::Parameters::set_num_islands ( int new_num_islands)
inline

Definition at line 125 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_objectives()

void Brush::Parameters::set_objectives ( vector< string > new_objectives)
inline

Definition at line 137 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_pop_size()

void Brush::Parameters::set_pop_size ( int new_pop_size)
inline

Definition at line 98 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_random_state()

void Brush::Parameters::set_random_state ( int new_random_state)
inline

Definition at line 95 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_save_population()

void Brush::Parameters::set_save_population ( string new_save_population)
inline

Definition at line 116 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_scorer_()

void Brush::Parameters::set_scorer_ ( string new_scorer_)
inline

Definition at line 110 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_sel()

void Brush::Parameters::set_sel ( string new_sel)
inline

Definition at line 140 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_shuffle_split()

void Brush::Parameters::set_shuffle_split ( bool shuff)
inline

Definition at line 161 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_surv()

void Brush::Parameters::set_surv ( string new_surv)
inline

Definition at line 143 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_use_arch()

void Brush::Parameters::set_use_arch ( bool new_use_arch)
inline

Definition at line 152 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_val_from_arch()

void Brush::Parameters::set_val_from_arch ( bool new_val_from_arch)
inline

Definition at line 155 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_validation_size()

void Brush::Parameters::set_validation_size ( float s)
inline

Definition at line 167 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_verbosity()

void Brush::Parameters::set_verbosity ( int new_verbosity)
inline

Definition at line 91 of file params.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ batch_size

float Brush::Parameters::batch_size = 0.0

Definition at line 78 of file params.h.

◆ class_weights

vector<float> Brush::Parameters::class_weights

weights for each class

Definition at line 66 of file params.h.

◆ classes

vector<int> Brush::Parameters::classes

class labels

Definition at line 65 of file params.h.

◆ classification

bool Brush::Parameters::classification

Definition at line 71 of file params.h.

◆ current_gen

unsigned int Brush::Parameters::current_gen = 1

Definition at line 27 of file params.h.

◆ cx_prob

float Brush::Parameters::cx_prob =0.2

cross rate for variation

Definition at line 60 of file params.h.

◆ feature_names

vector<string> Brush::Parameters::feature_names = {}

Definition at line 77 of file params.h.

◆ functions

std::unordered_map<string, float> Brush::Parameters::functions

Definition at line 42 of file params.h.

◆ load_population

string Brush::Parameters::load_population = ""

Definition at line 80 of file params.h.

◆ logfile

string Brush::Parameters::logfile = ""

Definition at line 83 of file params.h.

◆ max_depth

unsigned int Brush::Parameters::max_depth = 6

Definition at line 35 of file params.h.

◆ max_gens

int Brush::Parameters::max_gens = 100

Definition at line 31 of file params.h.

◆ max_size

unsigned int Brush::Parameters::max_size = 50

Definition at line 36 of file params.h.

◆ max_stall

int Brush::Parameters::max_stall = 0

Definition at line 32 of file params.h.

◆ max_time

int Brush::Parameters::max_time = -1

Definition at line 33 of file params.h.

◆ mig_prob

float Brush::Parameters::mig_prob = 0.05

Definition at line 61 of file params.h.

◆ mode

string Brush::Parameters::mode ="regression"

Definition at line 25 of file params.h.

◆ mutation_probs

std::map<std::string, float> Brush::Parameters::mutation_probs
Initial value:
= {
{"point", 0.167},
{"insert", 0.167},
{"delete", 0.167},
{"subtree", 0.167},
{"toggle_weight_on", 0.167},
{"toggle_weight_off", 0.167}
}

Definition at line 51 of file params.h.

◆ n_classes

unsigned int Brush::Parameters::n_classes

Definition at line 72 of file params.h.

◆ n_jobs

int Brush::Parameters::n_jobs = 1

number of parallel jobs -1 use all threads; 0 use same as number of islands; positive number specify the amouut of threads

Definition at line 85 of file params.h.

◆ num_islands

int Brush::Parameters::num_islands =5

Definition at line 43 of file params.h.

◆ objectives

vector<string> Brush::Parameters::objectives {"error","complexity"}

Definition at line 38 of file params.h.

◆ pop_size

int Brush::Parameters::pop_size = 100

Definition at line 30 of file params.h.

◆ random_state

int Brush::Parameters::random_state = 0

Definition at line 21 of file params.h.

◆ sample_weights

vector<float> Brush::Parameters::sample_weights

weights for each sample

Definition at line 67 of file params.h.

◆ save_population

string Brush::Parameters::save_population = ""

Definition at line 81 of file params.h.

◆ scorer_

string Brush::Parameters::scorer_ ="mse"

actual loss function used, determined by error

Definition at line 63 of file params.h.

◆ sel

string Brush::Parameters::sel = "lexicase"

Definition at line 40 of file params.h.

◆ shuffle_split

bool Brush::Parameters::shuffle_split = false

Definition at line 75 of file params.h.

◆ surv

string Brush::Parameters::surv = "nsga2"

Definition at line 41 of file params.h.

◆ use_arch

bool Brush::Parameters::use_arch =false

Definition at line 47 of file params.h.

◆ val_from_arch

bool Brush::Parameters::val_from_arch =true

Definition at line 48 of file params.h.

◆ validation_size

float Brush::Parameters::validation_size = 0.75

Definition at line 76 of file params.h.

◆ verbosity

int Brush::Parameters::verbosity = 0

Definition at line 22 of file params.h.


The documentation for this struct was generated from the following file: