28 #define EA_SELECT_INVALID (-1)
29 #define EA_SELECT_ROULETTE (0)
30 #define EA_SELECT_TOURNAMENT (1)
32 #define EA_STRING_ROULETTE ("roulette\0")
33 #define EA_STRING_TOURNAMENT ("tournament\0")
35 #define EA_SELECT_OPTIONS "roulette, tournament"
const char * ea_param_set_subsumption(struct XCSF *xcsf, const bool a)
void ea(struct XCSF *xcsf, const struct Set *set)
Executes the evolutionary algorithm (EA).
void ea_param_defaults(struct XCSF *xcsf)
Initialises default evolutionary algorithm parameters.
const char * ea_param_set_lambda(struct XCSF *xcsf, const int a)
const char * ea_param_set_theta(struct XCSF *xcsf, const double a)
const char * ea_type_as_string(const int type)
Returns a string representation of an EA select type from an integer.
const char * ea_param_set_err_reduc(struct XCSF *xcsf, const double a)
char * ea_param_json_export(const struct XCSF *xcsf)
Returns a json formatted string representation of the EA parameters.
const char * ea_param_set_fit_reduc(struct XCSF *xcsf, const double a)
const char * ea_param_set_pred_reset(struct XCSF *xcsf, const bool a)
size_t ea_param_load(struct XCSF *xcsf, FILE *fp)
Loads evolutionary algorithm parameters.
int ea_type_as_int(const char *type)
Returns the integer representation of an EA selection type.
const char * ea_param_set_p_crossover(struct XCSF *xcsf, const double a)
int ea_param_set_type_string(struct XCSF *xcsf, const char *a)
size_t ea_param_save(const struct XCSF *xcsf, FILE *fp)
Saves evolutionary algorithm parameters.
int ea_param_set_select_type(struct XCSF *xcsf, const int a)
void ea_param_json_import(struct XCSF *xcsf, cJSON *json)
Sets the EA parameters from a cJSON object.
const char * ea_param_set_select_size(struct XCSF *xcsf, const double a)
Parameters for operating the evolutionary algorithm.
double theta
Average match set time between EA invocations.
double p_crossover
Probability of applying crossover.
double err_reduc
Amount to reduce an offspring's error.
int select_type
Roulette or tournament for EA parental selection.
int lambda
Number of offspring to create each EA invocation.
double fit_reduc
Amount to reduce an offspring's fitness.
double select_size
Fraction of set size for tournaments.
bool subsumption
Whether to try and subsume offspring classifiers.
bool pred_reset
Whether to reset or copy offspring predictions.